Projects
Essentials
gpac
gpac-0.6.1-libpng-version-detection.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gpac-0.6.1-libpng-version-detection.patch of Package gpac (Revision 29)
Currently displaying revision
29
,
Show latest
Index: gpac-0.6.1/configure =================================================================== --- gpac-0.6.1.orig/configure +++ gpac-0.6.1/configure @@ -1222,11 +1222,26 @@ cat > $TMPC << EOF int main( void ) { return 0; } EOF -png_cflags="-I$prefix/include" -png_lflags="-L$prefix/lib -lpng -lz" +png_flavor="" +if [ -d /usr/include/libpng16 ] ; then \ + png_flavor="png16" +elif [ -d /usr/include/libpng15 ] ; then \ + png_flavor="png15" +elif [ -d /usr/include/libpng14 ] ; then \ + png_flavor="png14" +elif [ -d /usr/include/libpng12 ] ; then \ + png_flavor="png12" +else + png_flavor="png" +fi + +png_cflags="-I$prefix/include/lib$png_flavor" +png_lflags="-L$prefix/$libdir -l$png_flavor -lz" + if docc $png_cflags $png_lflags $LDFLAGS ; then has_png="system" -elif docc $LDFLAGS -lpng -lz ; then +elif docc $LDFLAGS -l$png_flavor -lz 2> /dev/null ; then + has_png="system" fi if test "$cross_prefix" = "" ; then @@ -1239,12 +1254,12 @@ if test "$cross_prefix" = "" ; then fi fi if test "$has_png" = "no" ; then - if docc -I$local_inc/png -L$local_lib -lpng ; then + if docc -I$local_inc/$png_flavor -L$local_lib -l$png_flavor 2> /dev/null ; then has_png="local" fi fi - +sed -i "s/png.h/lib$png_flavor\/png.h/" src/media_tools/img.c #look for MAD support cat > $TMPC << EOF @@ -3024,6 +3039,7 @@ if test "$has_jpeg" != "no" ; then fi echo "CONFIG_PNG=$has_png" >> config.mak +echo "png_flavor=$png_flavor" >> config.mak if test "$has_png" != "no" ; then echo "#define GPAC_HAS_PNG" >> $TMPH fi Index: gpac-0.6.1/static.mak =================================================================== --- gpac-0.6.1.orig/static.mak +++ gpac-0.6.1/static.mak @@ -45,7 +45,7 @@ endif #5 - PNG support ifeq ($(CONFIG_PNG), no) else -LINKLIBS+= -lpng +LINKLIBS+= -l$(png_flavor) ifeq ($(CONFIG_PNG), local) NEED_LOCAL_LIB="yes" MEDIATOOLS_CFLAGS+=-I"$(LOCAL_INC_PATH)/png"
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.