This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Review 1 - No pass] gd: A graphics library for fast imagecreation


>>>>> "Harold" == Harold L Hunt, <Harold> writes:

    Harold> Dr. Volker Zell wrote:
    >>>>>>> "Harold" == Harold L Hunt, <Harold> writes:
    Harold> checking how to run the C++ preprocessor... /lib/cpp
    Harold> configure: error: C++ preprocessor "/lib/cpp" fails sanity check
    Harold> See `config.log' for more details.
    >> What are the details in config.log ?
    >> Try running configure with set -x
    >> I think this has nothing to with my package shell script.

    Harold> How could if have nothing to do with the package shell script?  I ran
    Harold> the "conf" command and it borked.  It should not bork.  You should be
    Harold> passing any necessary options and declaring/setting any necessary
    Harold> environment variables in the shell script.  There should not be any
    Harold> additional knowledge of how to build this package that is not in the
    Harold> script.

    Harold> Granted, this could be a problem with my system, but I've not seen a
    Harold> configure script have trouble finding cpp before...

Here is the diff between my script and the generic-build-script from the cygwin
site. I don't see a place where I made drastic changes to the script in the conf
stage. Can anybody else confirming Harolds observations ?


--- generic-build-script	2003-11-11 19:39:57.022836800 +0100
+++ D:\usr\local\objs\gd\cygwin\gd-2.0.15-1.sh	2003-11-12 08:13:27.565236000 +0100
@@ -21,9 +21,13 @@
 
 tscriptname=`basename $0 .sh`
 export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
+export PKG2=libgd2
+export PKG3=libgd2-devel
 export VER=`echo $tscriptname | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
 export REL=`echo $tscriptname | sed -e "s/${PKG}\-${VER}\-//"`
 export FULLPKG=${PKG}-${VER}-${REL}
+export FULLPKG2=${PKG2}-${VER}-${REL}
+export FULLPKG3=${PKG3}-${VER}-${REL}
 
 # determine correct decompression option and tarball filename
 if [ -e ${PKG}-${VER}.tar.gz ] ; then
@@ -38,11 +42,15 @@
 export src_pkg_name=${FULLPKG}-src.tar.bz2
 export src_patch_name=${FULLPKG}.patch
 export bin_pkg_name=${FULLPKG}.tar.bz2
+export bin_pkg_name2=${FULLPKG2}.tar.bz2
+export bin_pkg_name3=${FULLPKG3}.tar.bz2
 
 export src_orig_pkg=${topdir}/${src_orig_pkg_name}
 export src_pkg=${topdir}/${src_pkg_name}
 export src_patch=${topdir}/${src_patch_name}
 export bin_pkg=${topdir}/${bin_pkg_name}
+export bin_pkg2=${topdir}/${bin_pkg_name2}
+export bin_pkg3=${topdir}/${bin_pkg_name3}
 export srcdir=${topdir}/${PKG}-${VER}
 export objdir=${srcdir}/.build
 export instdir=${srcdir}/.inst
@@ -53,9 +61,13 @@
 # if this package creates binaries, they run on
 target=i686-pc-cygwin
 prefix=/usr
+pnoslash=`echo $prefix | sed -e 's#^/##'`
 sysconfdir=/etc
+snoslash=`echo $sysconfdir | sed -e 's#^/##'`
+
 MY_CFLAGS="-O2"
 MY_LDFLAGS=
+MY_LIBS="-liconv"
 
 mkdirs() {
   (cd ${topdir} && \
@@ -69,11 +81,25 @@
   tar xv${opt_decomp}f ${src_orig_pkg} ; \
   cd ${topdir} && \
   patch -p0 < ${src_patch} 
-  && mkdirs )
+  && mkdirs 
+  mkpatch
+  bootstrap 
+  )
+}
+bootstrap() {
+  (cd ${srcdir}                                        && \
+  libtoolize --automake --copy --force                 && \
+  aclocal                                              && \
+  automake --gnu --add-missing --force-missing --copy  && \
+  autoconf                                             && \
+  autoheader
+  )
 }
 conf() {
   (cd ${objdir} && \
-  CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" \
+  lndir ../ && \
+  rm -rf .build .inst .sinst CYGWIN-PATCHES && \
+  CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" LIBS="${MY_LIBS}" \
   ${srcdir}/configure \
   --srcdir=${srcdir} --prefix=${prefix} \
   --exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
@@ -103,16 +129,57 @@
       rm -f ${instdir}${f} ; \
     fi ;\
   done &&\
-  for d in ${prefix}/share/doc/${PKG}-${VER} ${prefix}/share/doc/Cygwin \
-           ${sysconfdir}/postinstall ; do
-    if [ ! -d ${instdir}${d} ] ; then
-      mkdir -p ${instdir}${d} ;\
+  for dirn in ${prefix}/share/doc/${PKG}-${VER} ${prefix}/share/doc/${PKG3}-${VER} \
+    ${prefix}/share/doc/Cygwin ${sysconfdir}/postinstall ; do \
+    if [ ! -d ${instdir}${dirn} ]; then \
+      mkdir -p ${instdir}${dirn} ; \
     fi ;\
-  done &&\
+  done && \
   templist=""; \
-  for f in ${srcdir}/ANNOUNCE ${srcdir}/CHANGES ${srcdir}/INSTALL \
-           ${srcdir}/KNOWNBUG ${srcdir}/LICENSE ${srcdir}/README \
-           ${srcdir}/TODO ${srcdir}/COPYING ; do \
+  for f in                 \
+    ${srcdir}/ABOUT*       \
+    ${srcdir}/ANNOUNCE*    \
+    ${srcdir}/AUTHOR*      \
+    ${srcdir}/BUG*         \
+    ${srcdir}/BUILDING     \
+    ${srcdir}/changelog*   \
+    ${srcdir}/changeLog*   \
+    ${srcdir}/ChangeLog*   \
+    ${srcdir}/changes*     \
+    ${srcdir}/Changes*     \
+    ${srcdir}/CHANGES*     \
+    ${srcdir}/copying      \
+    ${srcdir}/COPY*        \
+    ${srcdir}/CREDIT*      \
+    ${srcdir}/FAQ*         \
+    ${srcdir}/FEATURES     \
+    ${srcdir}/FILES        \
+    ${srcdir}/FIXES        \
+    ${srcdir}/HACKING      \
+    ${srcdir}/HISTORY      \
+    ${srcdir}/HOWTO*       \
+    ${srcdir}/index.htm*   \
+    ${srcdir}/INSTALL*     \
+    ${srcdir}/LICENCE*     \
+    ${srcdir}/LICENSE*     \
+    ${srcdir}/MAINTAINER*  \
+    ${srcdir}/MANIFEST     \
+    ${srcdir}/*NEWS        \
+    ${srcdir}/PLATFORM*    \
+    ${srcdir}/PORTING      \
+    ${srcdir}/PROBLEMS     \
+    ${srcdir}/*readme*     \
+    ${srcdir}/*Readme*     \
+    ${srcdir}/*READ*ME*    \
+    ${srcdir}/REL*NOTES*   \
+    ${srcdir}/RELEASE      \
+    ${srcdir}/SUPPORT      \
+    ${srcdir}/TESTS        \
+    ${srcdir}/THANKS       \
+    ${srcdir}/TO*DO        \
+    ${srcdir}/USAGE        \
+    ${srcdir}/USERS
+  do
     if [ -f $f ] ; then \
       templist="$templist $f"; \
     fi ; \
@@ -120,20 +187,20 @@
   if [ ! "x$templist" = "x" ]; then \
     /usr/bin/install -m 644 $templist \
          ${instdir}${prefix}/share/doc/${PKG}-${VER} ;
+    /usr/bin/install -m 644 $templist \
+         ${instdir}${prefix}/share/doc/${PKG3}-${VER} ;
   fi && \
-  if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
-    /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
-      ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \
-  else \
-    if [ -f ${srcdir}/CYGWIN-PATCHES/README ]; then \
-      /usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \
-        ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README ; \
-    fi ;\
-  fi ;\
+  cat ${srcdir}/CYGWIN-PATCHES/${PKG}.frag \
+    ${srcdir}/CYGWIN-PATCHES/README.frag > \
+    ${instdir}${prefix}/share/doc/Cygwin/${PKG}-${VER}.README && \
+  cat ${srcdir}/CYGWIN-PATCHES/${PKG3}.frag \
+    ${srcdir}/CYGWIN-PATCHES/README.frag > \
+    ${instdir}${prefix}/share/doc/Cygwin/${PKG3}-${VER}.README && \
   if [ -f ${srcdir}/CYGWIN-PATCHES/postinstall.sh ] ; then \
-  /usr/bin/install -m 755 ${srcdir}/CYGWIN-PATCHES/postinstall.sh \
-      ${instdir}${sysconfdir}/postinstall/${PKG}.sh
-  fi )
+    /usr/bin/install -m 755 ${srcdir}/CYGWIN-PATCHES/postinstall.sh \
+        ${instdir}${sysconfdir}/postinstall/${PKG3}.sh
+  fi
+ )   
 }
 strip() {
   (cd ${instdir} && \
@@ -148,8 +215,27 @@
 }
 pkg() {
   (cd ${instdir} && \
-  tar cvjf ${bin_pkg} * )
-}
+  tar cvjf ${bin_pkg} \
+    --exclude="${pnoslash}/bin/*.dll" \
+    --exclude="${pnoslash}/bin/gdlib-config" \
+    --exclude="${pnoslash}/include" \
+    --exclude="${pnoslash}/lib" \
+    --exclude="${snoslash}/postinstall" \
+    --exclude="${pnoslash}/share/doc/${PKG3}*" \
+    --exclude="${pnoslash}/share/doc/Cygwin/${PKG3}*" \
+    * ; 
+  tar cvjf ${bin_pkg2} ${pnoslash}/bin/*.dll ;
+  tar cvjf ${bin_pkg3} \
+    --exclude="${pnoslash}/bin/*.dll" \
+    --exclude="${pnoslash}/bin/*.exe" \
+    --exclude="${pnoslash}/bin/bdftogd" \
+    ${pnoslash}/bin \
+    ${pnoslash}/include \
+    ${pnoslash}/lib \
+    ${snoslash}/postinstall \
+    ${pnoslash}/share/doc/${PKG3}* \
+    ${pnoslash}/share/doc/Cygwin/${PKG3}*
+)}
 mkpatch() {
   (cd ${srcdir} && \
   find . -name "autom4te.cache" | xargs rm -rf > /dev/null
@@ -162,8 +248,7 @@
   rm -rf ${PKG}-${VER}-orig )
 }
 spkg() {
-  (mkpatch && \
-  cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
+  (cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
   cp $0 ${srcinstdir}/`basename $0` && \
   cd ${srcinstdir} && \
   tar cvjf ${src_pkg} * )


    Harold> Harold

Ciao
  Volker


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]