Message ID | 1422300260-5361-2-git-send-email-bernd.kuhls@t-online.de |
---|---|
State | Superseded |
Headers | show |
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes: > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> > --- > package/fbv/Config.in | 4 +-- > package/fbv/fbv-1.0b-giflib.patch | 69 +++++++++++++++++++++++++++++++++++++ > package/fbv/fbv.mk | 10 +++++- > 3 files changed, 80 insertions(+), 3 deletions(-) > create mode 100644 package/fbv/fbv-1.0b-giflib.patch > diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk > index fe24a6f..81881ff 100644 > --- a/package/fbv/fbv.mk > +++ b/package/fbv/fbv.mk > @@ -30,7 +30,15 @@ else > FBV_CONFIGURE_OPTS += --without-libjpeg > endif > ifeq ($(BR2_PACKAGE_FBV_GIF),y) > -FBV_DEPENDENCIES += libungif > +FBV_DEPENDENCIES += giflib > +define FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB > + $(SED) 's|-lungif|-lgif|' $(@D)/configure > +endef > +FBV_PRE_CONFIGURE_HOOKS += FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB > +define FBV_MAKE_LIBUNGIF_IS_NOW_GIFLIB > + $(SED) 's|-lungif|-lgif|' $(@D)/Make.conf > +endef Why is it needed to patch Make.conf if you already patch configure (which generates it)? I would prefer to see the configure changes in the giflib patch instead. How do the archlinux guys handle it?
Hi, Peter Korsgaard <peter@korsgaard.com> wrote in news:87a914z20n.fsf@dell.be.48ers.dk: >>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls- zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org> writes: > > > +define FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB > > + $(SED) 's|-lungif|-lgif|' $(@D)/configure > > +endef > > +FBV_PRE_CONFIGURE_HOOKS += FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB > > +define FBV_MAKE_LIBUNGIF_IS_NOW_GIFLIB > > + $(SED) 's|-lungif|-lgif|' $(@D)/Make.conf > > +endef > > Why is it needed to patch Make.conf if you already patch configure > (which generates it)? right, patching Make.conf is not necessary, I will remove it in the next patch version. > I would prefer to see the configure changes in the giflib patch > instead. How do the archlinux guys handle it? They are using sed to change Make.conf https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD? h=packages/fbv which I did in the first place, but then configure printed this checking for libungif presence... no although compilation with libgif worked, so I patched the configure scripts afterwards to fix the wrong configure log but forgot to remove the Make.conf patch ;) The next version will contain a patch for configure. Regards, Bernd
diff --git a/package/fbv/Config.in b/package/fbv/Config.in index b8a9fe4..3160a85 100644 --- a/package/fbv/Config.in +++ b/package/fbv/Config.in @@ -26,8 +26,8 @@ config BR2_PACKAGE_FBV_JPEG config BR2_PACKAGE_FBV_GIF bool "GIF support" default y - select BR2_PACKAGE_LIBUNGIF + select BR2_PACKAGE_GIFLIB help - Enable support for GIF using libungif. + Enable support for GIF using giflib. endif # BR2_PACKAGE_FBV diff --git a/package/fbv/fbv-1.0b-giflib.patch b/package/fbv/fbv-1.0b-giflib.patch new file mode 100644 index 0000000..355a585 --- /dev/null +++ b/package/fbv/fbv-1.0b-giflib.patch @@ -0,0 +1,69 @@ +Adjust source code to work with giflib 5.1x + +Downloaded from +https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib-5.1.patch?h=packages/fbv + +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> + +diff -wbBur fbv-1.0b/gif.c fbv-1.0b.my/gif.c +--- fbv-1.0b/gif.c 2003-08-25 00:23:02.000000000 +0400 ++++ fbv-1.0b.my/gif.c 2014-05-29 18:39:41.337332872 +0400 +@@ -31,10 +31,10 @@ + #include <string.h> + #define min(a,b) ((a) < (b) ? (a) : (b)) + #define gflush return(FH_ERROR_FILE); +-#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } +-#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); } ++#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } ++#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } + #define agflush return(FH_ERROR_FORMAT); +-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } ++#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } + + + int fh_gif_id(char *name) +@@ -81,7 +81,7 @@ + ColorMapObject *cmap; + int cmaps; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, NULL); + if(gft==NULL){printf("err5\n"); gflush;} ////////// + do + { +@@ -170,7 +170,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_OK); + } + +@@ -184,7 +184,7 @@ + int extcode; + GifRecordType rt; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, NULL); + if(gft==NULL) gflush; + do + { +@@ -197,7 +197,7 @@ + px=gft->Image.Width; + py=gft->Image.Height; + *x=px; *y=py; +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_OK); + break; + case EXTENSION_RECORD_TYPE: +@@ -210,7 +210,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_FORMAT); + } + #endif diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk index fe24a6f..81881ff 100644 --- a/package/fbv/fbv.mk +++ b/package/fbv/fbv.mk @@ -30,7 +30,15 @@ else FBV_CONFIGURE_OPTS += --without-libjpeg endif ifeq ($(BR2_PACKAGE_FBV_GIF),y) -FBV_DEPENDENCIES += libungif +FBV_DEPENDENCIES += giflib +define FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB + $(SED) 's|-lungif|-lgif|' $(@D)/configure +endef +FBV_PRE_CONFIGURE_HOOKS += FBV_CONFIGURE_LIBUNGIF_IS_NOW_GIFLIB +define FBV_MAKE_LIBUNGIF_IS_NOW_GIFLIB + $(SED) 's|-lungif|-lgif|' $(@D)/Make.conf +endef +FBV_POST_CONFIGURE_HOOKS += FBV_MAKE_LIBUNGIF_IS_NOW_GIFLIB else FBV_CONFIGURE_OPTS += --without-libungif endif
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> --- package/fbv/Config.in | 4 +-- package/fbv/fbv-1.0b-giflib.patch | 69 +++++++++++++++++++++++++++++++++++++ package/fbv/fbv.mk | 10 +++++- 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 package/fbv/fbv-1.0b-giflib.patch