add install script to substitute prefix in a pc file on Windows.
authorKitae Kim <kt920.kim@samsung.com>
Fri, 4 Apr 2014 11:06:03 +0000 (20:06 +0900)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Tue, 18 Nov 2014 11:07:56 +0000 (12:07 +0100)
PKG_CONFIG_PATH overrides a prefix variable in a .pc file on Windows.
That is why the variable is replaced with empty value.

Change-Id: Iae70b12fac310bb410b13fee3d37c52117885cff
Signed-off-by: Kitae Kim <kt920.kim@samsung.com>
package/build.windows
package/libav-dev.install.windows [new file with mode: 0644]
package/pkginfo.manifest

index 250f59d..40f8f2c 100755 (executable)
@@ -45,23 +45,9 @@ build()
        fi
 }
 
-# change prefix in *.pc
-change_prefix()
-{
-       PKG_CONFIG_DIR=${SRCDIR}/lib/pkgconfig
-
-       for pc in `ls ${PKG_CONFIG_DIR}`; do
-               #echo $pc
-               sed -i '/^prefix=/!b;c\prefix=${LIBDIR}/' ${PKG_CONFIG_DIR}/$pc
-               sed -i "1s|^|LIBDIR=${ROOTDIR}\n|" ${PKG_CONFIG_DIR}/$pc
-       done
-}
-
 # install
 install()
 {
-       change_prefix
-
        DEV_DIR=${SRCDIR}/package/libav-dev.package.${TARGET_OS}/data/libav
        LIB_DIR=${SRCDIR}/package/libav.package.${TARGET_OS}/data/tools/emulator/bin/
 
diff --git a/package/libav-dev.install.windows b/package/libav-dev.install.windows
new file mode 100644 (file)
index 0000000..9bf2ce2
--- /dev/null
@@ -0,0 +1,13 @@
+@echo off
+
+setlocal enabledelayedexpansion
+set PC_PATH=%INSTALLED_PATH:"=%\*.pc
+
+@echo %PC_PATH%
+
+FOR /F %%i in ('dir /s /b %PC_PATH%') DO (
+@echo %%i
+@echo prefix= >> %%i.bak
+findstr /V "^prefix" %%i >> %%i.bak
+move /Y %%i.bak %%i
+)
index ed7ff7f..d38d849 100644 (file)
@@ -1,4 +1,4 @@
-Version: 1.2.1
+Version: 1.3.0
 Maintainer: YeongKyoon Lee<yeongkyoon.lee@samsung.com>
 Source: libav