[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:44:30 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a0d9964

The following commit has been merged in the master branch:
commit a0d99641a564dcd2dc12330da4af7b3f1441628b
Author: Robin Mills <robin at clanmills.com>
Date:   Mon Dec 8 16:51:34 2014 +0000

    Update jenkins_build.sh for MinGW
---
 jenkins_build.sh | 262 ++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 164 insertions(+), 98 deletions(-)

diff --git a/jenkins_build.sh b/jenkins_build.sh
index 5b1402c..ec5bcab 100755
--- a/jenkins_build.sh
+++ b/jenkins_build.sh
@@ -2,10 +2,10 @@
 
 ##
 # jenkins_build.sh
-#	called by jenkins to build/test exiv2 
-#	- jenkins sets environment variables
-#	called from terminal 
-#	- script has build-in defaults for some environment variable
+#   called by jenkins to build/test exiv2 
+#   - jenkins sets environment variables
+#   called from terminal 
+#   - script has build-in defaults for some environment variable
 #
 #  arguments:
 #    status    : filter last build with grep
@@ -22,21 +22,13 @@ start=$(date)
 starts=$(date +%s)
 
 ##
-# are we recursively building mingw?
-buildmingw=0
-if [ "$1" == "buildmingw" ]; then
-	buildmingw=1
-	shift
-fi
-
-##
 # functions
 run_tests() {
-	if [ "$result" == "0" ]; then
-		if [ "$tests" == true ]; then
-			make tests
-		fi
-	fi
+    if [ "$result" == "0" ]; then
+        if [ "$tests" == true ]; then
+            make tests
+        fi
+    fi
 }
 
 thepath () { 
@@ -53,23 +45,23 @@ thepath () {
 # arg: status [grep-args]
 # example: ./jenkins_build.sh status -e URL
 if [ "$1" == "status" ]; then
-	shift
-	build=$(basename $PWD)
-	declare -A expects=( [linux]=900 [macosx]=900 [cygwin]=1000 [mingw]=100 [msvc]=1200 )
-	for b in linux macosx cygwin mingw msvc ; do
-		echo $build/$b
-		curl --silent $JENKINS/job/Exiv2-$build/label=$b/lastBuild/consoleText | tee $tmp |\
-		    grep -E -e SVN_[A-Z]+= -e JOB_NAME -e BUILD_ID -e Finished -e seconds $@ ;
-		declare -i lines=$(wc -l $tmp | cut -d/ -f 1)
-		declare -i expect=${expects[$b]}
-		diff=$(( lines-expect>0?lines-expect:expect-lines ))
-		msg=''
-		warn=''
-		if [ "$diff" -gt "200" ]; then warn="***" ; msg="TAKE CARE " ; fi
-		echo "${warn}${msg}lines= ${lines} expect~${expect} diff=${diff}" "${msg}${warn}"
-		echo ''
-	done
-	exit $result
+    shift
+    build=$(basename $PWD)
+    declare -A expects=( [linux]=900 [macosx]=900 [cygwin]=1000 [mingw]=100 [msvc]=1200 )
+    for b in linux macosx cygwin mingw msvc ; do
+        echo $build/$b
+        curl --silent $JENKINS/job/Exiv2-$build/label=$b/lastBuild/consoleText | tee $tmp |\
+            grep -E -e SVN_[A-Z]+= -e JOB_NAME -e BUILD_ID -e Finished -e seconds $@ ;
+        declare -i lines=$(wc -l $tmp | cut -d/ -f 1)
+        declare -i expect=${expects[$b]}
+        diff=$(( lines-expect>0?lines-expect:expect-lines ))
+        msg=''
+        warn=''
+        if [ "$diff" -gt "200" ]; then warn="***" ; msg="TAKE CARE " ; fi
+        echo "${warn}${msg}lines= ${lines} expect~${expect} diff=${diff}" "${msg}${warn}"
+        echo ''
+    done
+    exit $result
 fi
 
 
@@ -80,10 +72,10 @@ fi
 # set +v
 DIR="$PWD"
 if [ -e /home/rmills/bin/.profile ]; then
-	source /home/rmills/bin/.profile
+    source /home/rmills/bin/.profile
 fi
 if [ -e /Users/rmills/bin/.profile ]; then
-	source /Users/rmills/bin/.profile
+    source /Users/rmills/bin/.profile
 fi
 cd "$DIR"
 # set -v
@@ -91,24 +83,24 @@ cd "$DIR"
 ##
 # where are we?
 export PLATFORM=''
-if [ `uname` == Darwin	]; then
-	PLATFORM=macosx
+if [ `uname` == Darwin  ]; then
+    PLATFORM=macosx
 elif [ `uname -o` == Cygwin ]; then
-	PLATFORM=cygwin
+    PLATFORM=cygwin
 elif [ `uname -o` == Msys ]; then
-	PLATFORM=mingw
+    PLATFORM=mingw
 else
-	PLATFORM=linux
+    PLATFORM=linux
 fi
 
 ##
 # set up some defaults (used when running this script from the terminal)
 echo "1 target = $target platform = $PLATFORM WORKSPACE = $WORKSPACE"
 if [ $PLATFORM == "macosx" -a -z "$macosx"   ]; then export macosx=true ; export target=macosx    ; fi
-if [ $PLATFORM == "linux"  -a -z "$linux"    ]; then export linux=true  ; export target=linux	  ; fi
-if [ -z "$cygwin"          -a ! -z "$CYGWIN" ]; then export cygwin=$CYGWIN                        ; fi                   
-if [ -z "$tests"     ]; then export tests=true                                                    ; fi
-if [ -z "$WORKSPACE" ]; then export WORKSPACE="$0/$PLATFORM"                                      ; fi
+if [ $PLATFORM == "linux"  -a -z "$linux"    ]; then export linux=true  ; export target=linux     ; fi
+if [ -z "$cygwin"    -a ! -z "$CYGWIN" ]; then export cygwin=$CYGWIN              ; fi       
+if [ -z "$tests"     ]; then export tests=true                         ; fi
+if [ -z "$WORKSPACE" ]; then export WORKSPACE="$0/$PLATFORM"                  ; fi
 
 if [ -z "$target" ]; then export target=$(basename $(echo $WORKSPACE | sed -E -e 's#\#/#g'))     ; fi
 echo "2 target = $target platform = $PLATFORM WORKSPACE = $WORKSPACE"
@@ -123,13 +115,13 @@ echo   ----------------------
 ##
 # cleanup from last time (if there was a last time)
 if [ -e config/config.mk ]; then
-	if [   -e bin ]; then
-		rm -rf bin
-	fi
-	if [ ! -e bin ]; then
-	   mkdir bin
-	fi
-	make distclean
+    if [   -e bin ]; then
+        rm -rf bin
+    fi
+    if [ ! -e bin ]; then
+       mkdir bin
+    fi
+    make distclean
 fi
 
 ##
@@ -140,84 +132,158 @@ make config &>/dev/null
 ##
 # decide what to do about curl and ssh
 # 3 possibilities:
-# 1 withcurl is empty		   (for 0.24 builds without WebReady support)
-# 2 withcurl == --with-curl	   (build supports curl and not requested)
+# 1 withcurl is empty          (for 0.24 builds without WebReady support)
+# 2 withcurl == --with-curl    (build supports curl and not requested)
 # 3 withcurl == --without-curl (build supports curl and requested)
 export withcurl=''
 export withssh=''
 if grep -q curl ./configure ; then
-	if [ "$curl" == "true" ]; then withcurl=--with-curl ; else withcurl=--without-curl; fi
+    if [ "$curl" == "true" ]; then withcurl=--with-curl ; else withcurl=--without-curl; fi
 fi
-if grep -q ssh	./configure ; then
-	if [ "$ssh"	 == "true" ]; then withssh=--with-ssh	; else withssh=--without-ssh  ; fi
+if grep -q ssh  ./configure ; then
+    if [ "$ssh"  == "true" ]; then withssh=--with-ssh   ; else withssh=--without-ssh  ; fi
 fi
 
 ##
 # what kind of build is this?
 build=NONE
 
-if [ $PLATFORM == "linux"  -a "$target" == "linux"  -a "$linux"	 == "true"  ]; then build=UNIX ; fi
+if [ $PLATFORM == "linux"  -a "$target" == "linux"  -a "$linux"  == "true"  ]; then build=UNIX ; fi
 if [ $PLATFORM == "macosx" -a "$target" == "macosx" -a "$macosx" == "true"  ]; then build=UNIX ; fi
 if [ $PLATFORM == "cygwin" -a "$target" == "cygwin" -a "$cygwin" == "true"  ]; then build=CYGW ; fi
-if [ $PLATFORM == "cygwin" -a "$target" == "mingw"  -a "$mingw"	 == "true"  ]; then build=MING ; fi
-if [ $PLATFORM == "cygwin" -a "$target" == "msvc"   -a "$msvc"	 == "true"  ]; then build=MSVC ; fi
-if [ $PLATFORM == "mingw"  -a "$target" == "mingw"                          ]; then build=MING ; fi
+if [ $PLATFORM == "cygwin" -a "$target" == "mingw"  -a "$mingw"  == "true"  ]; then build=MING ; fi
+if [ $PLATFORM == "cygwin" -a "$target" == "msvc"   -a "$msvc"   == "true"  ]; then build=MSVC ; fi
+if [ $PLATFORM == "mingw"  -a "$target" == "mingw"              ]; then build=MING ; fi
 
 echo "3 target = $target platform = $PLATFORM build = $build"
 
 case "$build" in
   UNIX) 
-		echo -------------
-		echo ./configure --prefix=$PWD/usr	$withcurl $withssh
-		echo -------------
-		./configure --prefix=$PWD/usr  $withcurl $withssh
-		make -j4 "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs"
-		make install
-		make -j4 samples "CXXFLAGS=-I${PWD}/usr/include -I${PWD}/src" "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs -lexiv2"
-		result=$?
-		run_tests
+        echo -------------
+        echo ./configure --prefix=$PWD/usr  $withcurl $withssh
+        echo -------------
+        ./configure --prefix=$PWD/usr  $withcurl $withssh
+        make -j4 "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs"
+        make install
+        make -j4 samples "CXXFLAGS=-I${PWD}/usr/include -I${PWD}/src" "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs -lexiv2"
+        result=$?
+        run_tests
   ;;
   
   CYGW) 
-		# export LIBS=-lintl
-		# I've given up:
-		# 1. trying to get Cygwin to build with gettext and friends
-		# 2. trying to get Cygwin to install into a local directory
-		./configure --disable-nls  $withcurl $withssh
-		make -j4
-		# result=$?
-		make install
-		make -j4 samples
-		run_tests
+        # export LIBS=-lintl
+        # I've given up:
+        # 1. trying to get Cygwin to build with gettext and friends
+        # 2. trying to get Cygwin to install into a local directory
+        ./configure --disable-nls  $withcurl $withssh
+        make -j4
+        # result=$?
+        make install
+        make -j4 samples
+        run_tests
   ;;
 
   MING) 
-		if [ "$buildmingw" == "1" ]; then
-		    ./configure --disable-nls  $withcurl $withssh
-			make -j4
-			make install
-			make -j4 samples
-			run_tests
-		else
-			make clean
-			/c/Users/rmills/com/mingw64.sh "-c jenkins_build.sh buildmingw"
-		fi
+        if [ ! -z "$BUILDMINGW" ]; then
+            export CC=$(which gcc)
+            export CXX=$(which g++)
+            export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+            echo --- recursive MinGW build ---
+            ./configure $withcurl $withssh
+            make        # DO NOT USE -j4.  It seems to hang the build!
+            make install
+            make samples
+            run_tests
+            exiv2 -v -V
+        else
+            if [ -e config/config.mk ]; then make clean ; fi
+            (
+                export TMP=/tmp
+                export TEMP=$TMP
+                export BUILDMINGW=1
+                if [ "$x64" == true ]; then 
+                    /cygdrive/c/MinGW64/msys/1.0/bin/bash.exe -c "export PATH=/c/TDM-GCC-64/bin:/c/MinGW64/bin:/c/MinGW64/msys/1.0/bin:/c/MinGW64/msys/1.0/local/bin; $0"
+                    result=$?
+                else
+                    /cygdrive/c/MinGW/msys/1.0/bin/bash.exe   -c "export PATH=/c/MinGW/bin:/c/MinGW/msys/1.0/bin:/c/MinGW/msys/1.0/local/bin; $0"
+                    result=$?
+                fi
+            )
+#########################################
+##          #!/bin/bash
+##          # mingw32.sh
+##          # invoke 32bit MinGW bash 
+##          #
+##          export "PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\local\bin;"
+##          /cygdrive/c/MinGW/msys/1.0/bin/bash.exe $*
+##
+##          # That's all Folks
+##          ##
+#########################################
+
+#########################################
+##          : mingw32.bat
+##          : invoke MinGW bash
+##          :
+##          setlocal
+##          set "PATH=c:\MinGWin;c:\MinGW\msys.0in;C:\MinGW\msys.0\localin;"
+##          set "PS1=\! ${PWD}> "
+##          c:\MinGW\msys.0inash.exe %*%
+##
+##          : That's all Folks
+#########################################
+
+#########################################
+##          see http://clanmills.com/exiv2/mingw.shtml about 64bit build
+##          Install a fresh (32 bit) mingw/msys into c:\MinGW64
+##          install the 64 bit compiler from: http://tdm-gcc.tdragon.net
+##          I used the "on-demand" installer and "Create" put the tools in c:\TDM-GCC-64. The main change is to add the 64 bit compilers to the path BEFORE the 32 bit compilers. 
+##          set PATH=c:\TDM-GCC-64in;c:\MinGWin;c:\MinGW\msys.0in;C:\MinGW\msys.0\localin;
+##
+##          keep MinGW64 for 64 bit builds and /usr/lib has 64bit libraries
+##          keep MinGW   for 32 bit builds and /usr/lib has 32bit libraries
+##
+##          install msys-coreutils, binutils, autotools
+##
+##          For pkg-config see http://clanmills.com/exiv2/mingw.shtml
+#########################################
+
+#########################################
+##          zlib and expat
+##          mkdir -p ~/gnu/zlib ~/gnu/expat
+##          get the tar.gz files and tar zxf them
+##          build (see http://clanmills.com/exiv2/mingw.shtml about zlib)
+##          DO THIS IN BOTH c:\MinGW and c:\MinGW64
+#########################################
+
+#########################################
+##          The keith bug
+##          rm -rf /c/MinGW/lib/libintl.la
+#########################################
+
+#########################################
+##          to build dlfcn-win32
+##          git clone https://github.com/dlfcn-win32/dlfcn-win32
+##          cd dlfcn-win32 ; ./configure --prefix=/usr --enable-shared ; make ; make install
+#########################################
+
+        fi
   ;;
 
   MSVC) 
-		rm -rf $PWD/bin
-		mkdir $PWD/bin
+        rm -rf $PWD/bin
+        mkdir $PWD/bin
 
-		PATH=$PATH:/cygdrive/c/Windows/System32
-		cmd.exe /c "cd $(cygpath -aw .) && call jenkins_build.bat"
-		result=$?
+        PATH=$PATH:/cygdrive/c/Windows/System32
+        cmd.exe /c "cd $(cygpath -aw .) && call jenkins_build.bat"
+        result=$?
   ;;
   
   
   NONE) 
-		echo "**************************************"
-		echo "*** no build requested for $target ***"
-		echo "**************************************"
+        echo "**************************************"
+        echo "*** no build requested for $target ***"
+        echo "**************************************"
   ;; 
 esac
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list