Add patch to fix relative paths for fontlint (fixes #530760)
This commit is contained in:
		
							parent
							
								
									d86e9b64d1
								
							
						
					
					
						commit
						9f1d9e713d
					
				
							
								
								
									
										47
									
								
								fontforge-20090923-rel-path.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								fontforge-20090923-rel-path.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,47 @@ | |||||||
|  | diff -Nur fontforge-20090923.orig/gutils/fsys.c fontforge-20090923/gutils/fsys.c
 | ||||||
|  | --- fontforge-20090923.orig/gutils/fsys.c	2009-01-25 11:06:49.000000000 -0700
 | ||||||
|  | +++ fontforge-20090923/gutils/fsys.c	2009-12-31 09:59:54.000000000 -0700
 | ||||||
|  | @@ -41,6 +41,15 @@
 | ||||||
|  |   | ||||||
|  |  static char dirname_[1024]; | ||||||
|  |   | ||||||
|  | +static void savestrcpy(char *dest,const char *src) {
 | ||||||
|  | +    forever {
 | ||||||
|  | +       *dest = *src;
 | ||||||
|  | +       if ( *dest=='\0' )
 | ||||||
|  | +    break;
 | ||||||
|  | +       ++dest; ++src;
 | ||||||
|  | +    }
 | ||||||
|  | +}
 | ||||||
|  | +
 | ||||||
|  |  char *GFileGetAbsoluteName(char *name, char *result, int rsiz) { | ||||||
|  |      /* result may be the same as name */ | ||||||
|  |      char buffer[1000]; | ||||||
|  | @@ -62,13 +71,13 @@
 | ||||||
|  |  	    if ( *spt=='/' ) ++spt; | ||||||
|  |  	    for ( pt = spt; *pt!='\0' && *pt!='/'; ++pt ); | ||||||
|  |  	    if ( pt==spt )	/* Found // in a path spec, reduce to / (we've*/ | ||||||
|  | -		strcpy(spt,pt); /*  skipped past the :// of the machine name) */
 | ||||||
|  | -	    else if ( pt==spt+1 && spt[0]=='.' )	/* Noop */
 | ||||||
|  | -		strcpy(spt,pt);
 | ||||||
|  | -	    else if ( pt==spt+2 && spt[0]=='.' && spt[1]=='.' ) {
 | ||||||
|  | +               savestrcpy(spt,spt+1); /*  skipped past the :// of the machine name) */
 | ||||||
|  | +            else if ( pt==spt+1 && spt[0]=='.' ) {      /* Noop */
 | ||||||
|  | +               savestrcpy(spt,spt+2);
 | ||||||
|  | +            } else if ( pt==spt+2 && spt[0]=='.' && spt[1]=='.' ) {
 | ||||||
|  |  		for ( bpt=spt-2 ; bpt>rpt && *bpt!='/'; --bpt ); | ||||||
|  |  		if ( bpt>=rpt && *bpt=='/' ) { | ||||||
|  | -		    strcpy(bpt,pt);
 | ||||||
|  | +                    savestrcpy(bpt,pt);
 | ||||||
|  |  		    spt = bpt; | ||||||
|  |  		} else { | ||||||
|  |  		    rpt = pt; | ||||||
|  | @@ -99,7 +108,7 @@
 | ||||||
|  |   | ||||||
|  |      if ( dir==NULL || *dir=='\0' ) { | ||||||
|  |  	if ( strlen( fname )<size-1 )		/* valgrind didn't like my strncpies but this complication makes it happy */ | ||||||
|  | -	    strcpy(buffer,fname);
 | ||||||
|  | +            savestrcpy(buffer,fname);
 | ||||||
|  |  	else { | ||||||
|  |  	    strncpy(buffer,fname,size-1); | ||||||
|  |  	    buffer[size-1]='\0'; | ||||||
| @ -5,7 +5,7 @@ | |||||||
| 
 | 
 | ||||||
| Name:           fontforge | Name:           fontforge | ||||||
| Version:        20090923 | Version:        20090923 | ||||||
| Release:        1%{?dist} | Release:        2%{?dist} | ||||||
| Summary:        Outline and bitmap font editor | Summary:        Outline and bitmap font editor | ||||||
| 
 | 
 | ||||||
| Group:          Applications/Publishing | Group:          Applications/Publishing | ||||||
| @ -16,6 +16,7 @@ Source1:        fontforge.desktop | |||||||
| Source2:        http://downloads.sourceforge.net/fontforge/fontforge_htdocs-%{docs_version}.tar.bz2 | Source2:        http://downloads.sourceforge.net/fontforge/fontforge_htdocs-%{docs_version}.tar.bz2 | ||||||
| Source3:        fontforge.xml | Source3:        fontforge.xml | ||||||
| Patch1:         fontforge-20090224-pythondl.patch | Patch1:         fontforge-20090224-pythondl.patch | ||||||
|  | Patch2:		fontforge-20090923-rel-path.patch | ||||||
| BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||||||
| 
 | 
 | ||||||
| Requires:       xdg-utils | Requires:       xdg-utils | ||||||
| @ -57,6 +58,7 @@ to compile applications against fontforge. | |||||||
| %setup -q -n %{name}-%{version} | %setup -q -n %{name}-%{version} | ||||||
| 
 | 
 | ||||||
| %patch1 -p1 | %patch1 -p1 | ||||||
|  | %patch2 -p1 | ||||||
| 
 | 
 | ||||||
| mkdir htdocs | mkdir htdocs | ||||||
| tar xjf %{SOURCE2} -C htdocs | tar xjf %{SOURCE2} -C htdocs | ||||||
| @ -147,6 +149,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : | |||||||
| %{_libdir}/pkgconfig/*.pc | %{_libdir}/pkgconfig/*.pc | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Wed Dec 30 2009 Kevin Fenzi <kevin@tummy.com> - 20090923-2 | ||||||
|  | - Add patch to fix relative paths for fontlint (fixes #530760) | ||||||
|  | 
 | ||||||
| * Sun Nov 01 2009 Kevin Fenzi <kevin@tummy.com> - 20090923-1 | * Sun Nov 01 2009 Kevin Fenzi <kevin@tummy.com> - 20090923-1 | ||||||
| - Upgrade to 20090923 | - Upgrade to 20090923 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user