Merge pull request #4582 from OpenELEC/pkg-config-script-fixes

Pkg config script fixes
This commit is contained in:
Stephan Raue
2016-01-09 00:42:19 +01:00
22 changed files with 689 additions and 30 deletions

View File

@@ -48,6 +48,7 @@ post_makeinstall_host() {
}
post_makeinstall_target() {
rm -rf $SYSROOT_PREFIX/usr/bin/cxxtools-config
$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/cxxtools-config
rm -rf $INSTALL/usr/bin
}

View File

@@ -51,6 +51,8 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-unittest \
--with-stressjob=no"
post_makeinstall_target() {
$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/tntnet-config
rm -rf $INSTALL/usr/bin
rm -rf $INSTALL/usr/share
}

File diff suppressed because it is too large Load Diff

View File

@@ -48,9 +48,9 @@ pre_configure_target() {
}
post_makeinstall_target() {
mkdir -p $ROOT/$TOOLCHAIN/bin
cp -f $PKG_DIR/scripts/fribidi-config $ROOT/$TOOLCHAIN/bin
chmod +x $ROOT/$TOOLCHAIN/bin/fribidi-config
mkdir -p $SYSROOT_PREFIX/usr/bin
cp -f $PKG_DIR/scripts/fribidi-config $SYSROOT_PREFIX/usr/bin
chmod +x $SYSROOT_PREFIX/usr/bin/fribidi-config
rm -rf $INSTALL/usr/bin
}

View File

@@ -52,4 +52,5 @@ pre_configure_target() {
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i $SYSROOT_PREFIX/usr/bin/$PKG_NAME-config
}

View File

@@ -51,10 +51,8 @@ pre_configure_target() {
post_makeinstall_target() {
sed -e "s:\([\"'= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
-e "s:libs=\"-lpng15\":libs=\"-lpng15 -lz\":g" \
-e "s:libs=\"-lpng16\":libs=\"-lpng16 -lz\":g" \
-i $SYSROOT_PREFIX/usr/bin/libpng*-config
cp -P $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin
rm -rf $INSTALL/usr/bin
}

View File

@@ -116,9 +116,7 @@ pre_make_target() {
}
post_makeinstall_target() {
mkdir -p $ROOT/$TOOLCHAIN/bin
cp $SYSROOT_PREFIX/usr/bin/sdl2-config $ROOT/$TOOLCHAIN/bin
$SED "s:\(['=\" ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/sdl2-config
$SED "s:\(['=\" ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/sdl2-config
rm -rf $INSTALL/usr/bin
}

View File

@@ -0,0 +1,15 @@
diff -Naur vdr-epgsearch-29c174a/Makefile vdr-epgsearch-29c174a.patch/Makefile
--- vdr-epgsearch-29c174a/Makefile 2014-01-18 16:53:11.000000000 +0100
+++ vdr-epgsearch-29c174a.patch/Makefile 2016-01-07 04:47:33.004326981 +0100
@@ -130,9 +130,8 @@
OBJS = afuzzy.o blacklist.o changrp.o confdloader.o conflictcheck.o conflictcheck_thread.o distance.o $(PLUGIN).o epgsearchcats.o epgsearchcfg.o epgsearchext.o epgsearchsetup.o epgsearchsvdrp.o epgsearchtools.o mail.o md5.o menu_announcelist.o menu_blacklistedit.o menu_blacklists.o menu_commands.o menu_conflictcheck.o menu_deftimercheckmethod.o menu_dirselect.o menu_event.o menu_favorites.o menu_main.o menu_myedittimer.o menu_quicksearch.o menu_recsdone.o menu_search.o menu_searchactions.o menu_searchedit.o menu_searchresults.o menu_searchtemplate.o menu_switchtimers.o menu_templateedit.o menu_timersdone.o menu_whatson.o noannounce.o pending_notifications.o rcfile.o recdone.o recstatus.o searchtimer_thread.o services.o switchtimer.o switchtimer_thread.o templatefile.o timer_thread.o timerdone.o timerstatus.o uservars.o varparser.o
ifeq ($(REGEXLIB), pcre)
-LIBS += $(shell pcre-config --libs-posix)
-#LIBS += -L/usr/lib -lpcreposix -lpcre
-INCLUDE += $(shell pcre-config --cflags)
+LIBS += $(shell pkg-config --libs libpcreposix libpcre)
+INCLUDES += $(shell pkg-config --cflags libpcre)
DEFINES += -DHAVE_PCREPOSIX
else ifeq ($(REGEXLIB), tre)
LIBS += -L$(shell pkg-config --variable=libdir tre) $(shell pkg-config --libs tre)

View File

@@ -0,0 +1,12 @@
diff -Naur iptv-2.2.1/Makefile iptv-2.2.1.patch/Makefile
--- iptv-2.2.1/Makefile 2015-04-04 03:20:00.000000000 +0200
+++ iptv-2.2.1.patch/Makefile 2016-01-07 07:37:31.037078104 +0100
@@ -54,7 +54,7 @@
### Libraries
-LIBS = $(shell curl-config --libs)
+LIBS = $(shell pkg-config --libs libcurl)
### Includes and Defines (add further entries here):

View File

@@ -34,9 +34,9 @@ PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
pre_configure_target() {
export CFLAGS="$CFLAGS -fPIC -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
export CXXFLAGS="$CXXFLAGS -fPIC -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
export LDFLAGS="$LDFLAGS -fPIC -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
export LDFLAGS="$LDFLAGS -fPIC"
}
pre_make_target() {

View File

@@ -0,0 +1,86 @@
diff -Naur live-0.3.0/css/Makefile live-0.3.0.patch/css/Makefile
--- live-0.3.0/css/Makefile 2013-04-04 22:16:40.000000000 +0200
+++ live-0.3.0.patch/css/Makefile 2016-01-07 06:49:35.954078949 +0100
@@ -4,7 +4,7 @@
### Additional options to silence TNTNET warnings
TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-function
-TNTVERSION ?= $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+TNTVERSION ?= $(shell pkg-config --modversion tntnet | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
### The C++ compiler and options:
diff -Naur live-0.3.0/httpd/Makefile live-0.3.0.patch/httpd/Makefile
--- live-0.3.0/httpd/Makefile 2013-04-04 22:16:40.000000000 +0200
+++ live-0.3.0.patch/httpd/Makefile 2016-01-07 06:51:05.349223371 +0100
@@ -3,7 +3,7 @@
CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC
-CXXFLAGS += `tntnet-config --cxxflags`
+CXXFLAGS += `pkg-config --cflags tntnet`
### Includes and Defines (add further entries here):
diff -Naur live-0.3.0/javascript/Makefile live-0.3.0.patch/javascript/Makefile
--- live-0.3.0/javascript/Makefile 2013-04-04 22:16:40.000000000 +0200
+++ live-0.3.0.patch/javascript/Makefile 2016-01-07 06:49:51.561104158 +0100
@@ -4,7 +4,7 @@
### Additional options to silence TNTNET warnings
TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-function
-TNTVERSION ?= $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+TNTVERSION ?= $(shell pkg-config --modversion tntnet | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
### The C++ compiler and options:
diff -Naur live-0.3.0/Makefile live-0.3.0.patch/Makefile
--- live-0.3.0/Makefile 2013-04-04 22:16:40.000000000 +0200
+++ live-0.3.0.patch/Makefile 2016-01-07 06:48:29.683971910 +0100
@@ -26,7 +26,7 @@
LDFLAGS ?= -fPIC -g
### Check for libpcre c++ wrapper
-HAVE_LIBPCRECPP = $(shell pcre-config --libs-cpp)
+HAVE_LIBPCRECPP = $(shell pkg-config --libs libpcrecpp libpcre)
### The directory environment:
@@ -46,18 +46,18 @@
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
I18NTARG = $(shell if [ `echo $(APIVERSION) | tr [.] [0]` -ge "10507" ]; then echo "i18n"; fi)
-TNTVERSION = $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
-CXXTOOLVER = $(shell cxxtools-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+TNTVERSION = $(shell pkg-config --modversion tntnet | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+CXXTOOLVER = $(shell pkg-config --modversion cxxtools | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
TNTVERS7 = $(shell ver=$(TNTVERSION); if [ $$ver -ge "1606" ]; then echo "yes"; fi)
-CXXFLAGS += $(shell tntnet-config --cxxflags)
-LIBS += $(shell tntnet-config --libs)
+CXXFLAGS += $(shell pkg-config --cflags tntnet)
+LIBS += $(shell pkg-config --libs tntnet)
### Optional configuration features
PLUGINFEATURES =
ifneq ($(HAVE_LIBPCRECPP),)
PLUGINFEATURES += -DHAVE_LIBPCRECPP
- CXXFLAGS += $(shell pcre-config --cflags)
+ CXXFLAGS += $(shell pkg-config --cflags libpcreposix libpcre)
LIBS += $(HAVE_LIBPCRECPP)
endif
diff -Naur live-0.3.0/pages/Makefile live-0.3.0.patch/pages/Makefile
--- live-0.3.0/pages/Makefile 2013-04-04 22:16:40.000000000 +0200
+++ live-0.3.0.patch/pages/Makefile 2016-01-07 06:50:04.234124627 +0100
@@ -4,8 +4,8 @@
### Additional options to silence TNTNET warnings
TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-variable
-TNTVERSION ?= $(shell tntnet-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
-CXXTOOLVER ?= $(shell cxxtools-config --version | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+TNTVERSION ?= $(shell pkg-config --modversion tntnet | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
+CXXTOOLVER ?= $(shell pkg-config --modversion cxxtools | sed -e's/\.//g' | sed -e's/pre.*//g' | awk '/^..$$/ { print $$1."000"} /^...$$/ { print $$1."00"} /^....$$/ { print $$1."0" } /^.....$$/ { print $$1 }')
### The C++ compiler and options:

View File

@@ -0,0 +1,14 @@
diff -Naur vdr-plugin-epgfixer-1ad4aaf/Makefile vdr-plugin-epgfixer-1ad4aaf.patch/Makefile
--- vdr-plugin-epgfixer-1ad4aaf/Makefile 2015-01-01 11:15:50.000000000 +0100
+++ vdr-plugin-epgfixer-1ad4aaf.patch/Makefile 2016-01-07 04:40:37.742655989 +0100
@@ -70,8 +70,8 @@
OBJS = $(PLUGIN).o blacklist.o charset.o config.o epgclone.o epghandler.o regexp.o setup_menu.o tools.o
ifeq ($(REGEXLIB), pcre)
-LIBS += $(shell pcre-config --libs-posix)
-INCLUDES += $(shell pcre-config --cflags)
+LIBS += $(shell pkg-config --libs libpcreposix libpcre)
+INCLUDES += $(shell pkg-config --cflags libpcre)
DEFINES += -DHAVE_PCREPOSIX
endif

View File

@@ -45,7 +45,6 @@ make_target() {
make \
LIBDIR="." \
LOCDIR="./locale" \
LIBS="-lcxxtools-http -lcxxtools" \
all install-i18n
}

View File

@@ -0,0 +1,12 @@
diff -Naur vdr-plugin-restfulapi-0.2.1.4/Makefile vdr-plugin-restfulapi-0.2.1.4.patch/Makefile
--- vdr-plugin-restfulapi-0.2.1.4/Makefile 2015-03-18 23:12:01.000000000 +0100
+++ vdr-plugin-restfulapi-0.2.1.4.patch/Makefile 2016-01-07 05:24:24.036888492 +0100
@@ -49,7 +49,7 @@
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-LIBS += $(shell cxxtools-config --libs) -lcxxtools-http
+LIBS += $(shell pkg-config --libs cxxtools-http cxxtools)
CONFDIR = $(call PKGCFG,configdir)
PLGCONFDIR = $(CONFDIR)/plugins/$(PLUGIN)

View File

@@ -0,0 +1,12 @@
diff -Naur satip-2.2.2/Makefile satip-2.2.2.patch/Makefile
--- satip-2.2.2/Makefile 2015-04-26 03:20:00.000000000 +0200
+++ satip-2.2.2.patch/Makefile 2016-01-07 07:33:20.588462880 +0100
@@ -53,7 +53,7 @@
### Libraries
-LIBS = $(shell curl-config --libs)
+LIBS = $(shell pkg-config --libs libcurl)
### Includes and Defines (add further entries here):

View File

@@ -47,7 +47,6 @@ pre_configure_target() {
post_makeinstall_target() {
$SED "s:\(['=\" ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/freetype-config
cp $SYSROOT_PREFIX/usr/bin/freetype-config $ROOT/$TOOLCHAIN/bin
ln -v -sf $SYSROOT_PREFIX/usr/include/freetype2 $SYSROOT_PREFIX/usr/include/freetype
rm -rf $INSTALL/usr/bin

View File

@@ -32,11 +32,11 @@ PKG_LONGDESC="Libgcrypt is a general purpose cryptographic library based on the
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="--disable-asm --with-gnu-ld"
PKG_CONFIGURE_OPTS_TARGET="--disable-asm --with-gnu-ld --with-libgpg-error-prefix=$SYSROOT_PREFIX/usr"
post_makeinstall_target() {
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i src/libgcrypt-config
cp src/libgcrypt-config $ROOT/$TOOLCHAIN/bin
sed -e "s:\(['= ]\)\"/usr:\\1\"$SYSROOT_PREFIX/usr:g" -i src/$PKG_NAME-config
cp src/$PKG_NAME-config $SYSROOT_PREFIX/usr/bin
rm -rf $INSTALL/usr/bin
}

View File

@@ -63,5 +63,5 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/share
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i src/gpg-error-config
cp src/gpg-error-config $ROOT/$TOOLCHAIN/bin
cp src/gpg-error-config $SYSROOT_PREFIX/usr/bin
}

View File

@@ -36,8 +36,5 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-log --disable-debug-log --disable-examples-
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
-i $SYSROOT_PREFIX/usr/bin/libusb-config
mv $SYSROOT_PREFIX/usr/bin/libusb-config $ROOT/$TOOLCHAIN/bin
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i $SYSROOT_PREFIX/usr/bin/libusb-config
}

View File

@@ -43,10 +43,7 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_ansidecl_h=no \
--without-lzma"
post_makeinstall_target() {
$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \
$SYSROOT_PREFIX/usr/bin/xml2-config
mv $SYSROOT_PREFIX/usr/bin/xml2-config $ROOT/$TOOLCHAIN/bin
$SED "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" $SYSROOT_PREFIX/usr/bin/xml2-config
rm -rf $INSTALL/usr/bin
rm -rf $INSTALL/usr/lib/xml2Conf.sh

Some files were not shown because too many files have changed in this diff Show More