gettext-emacs stable port information

Package: gettext-emacs
Version: 0.14.5
Revision: 1
Distribution: 10.4
#Source: mirror:gnu:gettext/gettext-%v.tar.gz
Source: mirror:sourceforge:fink/gettext-%v.tar.gz
Source-MD5: e2f6581626a22a0de66dce1d81d00de3
PatchFile: %n.patch
PatchFile-MD5: 4559d9a9d49ee761bd730e8edb9acb20
PatchScript: <<
sed 's|@FINKPREFIX@|%p|g' < %{PatchFile} | patch -p1
cd build-aux; perl -pi -e 's/.*chmod.*777.*$//g' ltmain.sh
<<
Depends: libiconv, base-files, libgettext3-shlibs, emacsen
BuildDepends: libiconv-dev, fink (>= 0.24.12), libgettext3-dev
Replaces: gettext-bin (<= 0.10.40-18)
ConfigureParams: --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' --with-lispdir='${prefix}/share/emacs/site-lisp/%n' --disable-csharp --disable-libasprintf --disable-dependency-tracking

CompileScript: <<
cd gettext-tools && ./configure %c
cd gettext-tools && make
<<

InstallScript: <<
cd gettext-tools && make install DESTDIR=%d docdir=%p/share/doc/%n

rm -rf %i/bin %i/include %i/lib %i/share/aclocal %i/share/info %i/share/man %i/share/doc %i/share/gettext %i/share/locale

rm %i/share/emacs/site-lisp/gettext-emacs/*.elc

install -m 755 -d %i/lib/emacsen-common/packages/install
install -m 755 gettext-tools/fink/emacsen-install %i/lib/emacsen-common/packages/install/%n
install -m 755 -d %i/lib/emacsen-common/packages/remove
install -m 755 gettext-tools/fink/emacsen-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: README* AUTHORS COPYING NEWS THANKS PACKAGING

PostInstScript: <<
if [ -L %p/etc/alternatives/charset.alias ]; then
update-alternatives --remove charset.alias %p/lib/charset.alias.gettext
fi
%p/lib/emacsen-common/emacs-package-install %n
<<
PreRmScript: %p/lib/emacsen-common/emacs-package-remove %n

Description: Message localization support
DescDetail: <<
This package has the emacs files for gettext, not included in the main
package because of the large dependancy of emacs.
<<
DescPackaging: <<
Previous versions by Christoph Pfisterer.
<<
License: GPL/LGPL
Maintainer: Fink Core Group
Homepage: http://www.gnu.org/software/gettext/

gettext-emacs stable port .patch

diff -ruN gettext-0.14.5/gettext-tools/lib/execute.c gettext-0.14.5-patched/gettext-tools/lib/execute.c
--- gettext-0.14.5/gettext-tools/lib/execute.c 2005-05-20 13:19:48.000000000 -0700
+++ gettext-0.14.5-patched/gettext-tools/lib/execute.c 2006-08-14 05:21:26.000000000 -0700
@@ -62,7 +62,12 @@
#endif

#ifndef HAVE_ENVIRON_DECL
-extern char **environ;
+# ifdef __APPLE__
+# include
+# define environ (*_NSGetEnviron())
+# else
+ extern char **environ;
+# endif
#endif

#ifndef STDIN_FILENO
diff -ruN gettext-0.14.5/gettext-tools/lib/pipe.c gettext-0.14.5-patched/gettext-tools/lib/pipe.c
--- gettext-0.14.5/gettext-tools/lib/pipe.c 2005-05-20 13:25:23.000000000 -0700
+++ gettext-0.14.5-patched/gettext-tools/lib/pipe.c 2006-08-14 05:22:02.000000000 -0700
@@ -61,7 +61,12 @@
#endif

#ifndef HAVE_ENVIRON_DECL
-extern char **environ;
+# ifdef __APPLE__
+# include
+# define environ (*_NSGetEnviron())
+# else
+ extern char **environ;
+# endif
#endif

#ifndef STDIN_FILENO
diff -ruN gettext-0.13/gettext-tools/fink/emacsen-install gettext-0.13-patched/gettext-tools/fink/emacsen-install
--- gettext-0.13/gettext-tools/fink/emacsen-install Wed Dec 31 19:00:00 1969
+++ gettext-0.13-patched/gettext-tools/fink/emacsen-install Sun Nov 14 11:41:59 2004
@@ -0,0 +1,43 @@
+#! /bin/sh
+# @FINKPREFIX@/lib/emacsen-common/packages/install/gettext-emacs
+set -e
+
+FLAVOR=${1}
+PACKAGE=gettext-emacs
+
+echo install/${PACKAGE}: Handling install of emacsen flavor ${FLAVOR}
+
+el_files="po-mode.el po-compat.el"
+
+el_dir=@FINKPREFIX@/share/emacs/site-lisp/${PACKAGE}/
+elc_dir=@FINKPREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}/
+el_path_list=`for i in ${el_files}; do \
+ echo $i | perl -pe "s|^|${el_dir}|"; done`
+elc_path_list=`for i in ${el_files}; do \
+ echo $i | perl -pe "s|^|${elc_dir}|"; done`
+
+byte_compile_options="-batch -q --no-init-file --no-site-file"
+
+case $FLAVOR in
+ emacs20 | emacs21 )
+ echo install/${PACKAGE}: byte-compiling for ${FLAVOR}
+
+ install -m 755 -d ${elc_dir}
+
+ # Copy the temp .el files to the installation dir
+ cp ${el_path_list} ${elc_dir}
+
+ # Byte compile them
+ ${FLAVOR} ${byte_compile_options} ${elc_path_list}
+
+ # remove the redundant .el files
+ # presumes that any .el files in the dir are trash.
+ rm ${elc_dir}/*.el
+
+ ;;
+
+ * )
+ echo install/${PACKAGE}: Skipping unsupported flavor ${FLAVOR}
+ ;;
+esac
+
diff -ruN gettext-0.13/gettext-tools/fink/emacsen-remove gettext-0.13-patched/gettext-tools/fink/emacsen-remove
--- gettext-0.13/gettext-tools/fink/emacsen-remove Wed Dec 31 19:00:00 1969
+++ gettext-0.13-patched/gettext-tools/fink/emacsen-remove Sun Nov 14 11:42:23 2004
@@ -0,0 +1,18 @@
+#! /bin/sh
+# @FINKPREFIX@/lib/emacsen-common/packages/remove/gettext-emacs
+set -e
+
+FLAVOR=${1}
+PACKAGE=gettext-emacs
+
+echo remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR}
+
+case $FLAVOR in
+ emacs20 | emacs21 | xemacs21 )
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf @FINKPREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+ ;;
+ * )
+ echo remove/${PACKAGE}: Skipping unsupported flavor ${FLAVOR}
+ ;;
+esac

gettext-emacs _unstable_ port information

Package: gettext-emacs
Version: 0.14.5
Revision: 3
#Source: mirror:gnu:gettext/gettext-%v.tar.gz
Source: mirror:sourceforge:fink/gettext-%v.tar.gz
Source-MD5: e2f6581626a22a0de66dce1d81d00de3
PatchFile: %n.patch
PatchFile-MD5: 4559d9a9d49ee761bd730e8edb9acb20
PatchScript: <<
sed 's|@FINKPREFIX@|%p|g' < %{PatchFile} | patch -p1
cd build-aux; perl -pi -e 's/.*chmod.*777.*$//g' ltmain.sh
<<
Depends: libiconv, base-files, libgettext3-shlibs, emacsen
BuildDepends: libiconv-dev, fink (>= 0.24.12), libgettext3-dev
Replaces: gettext-bin (<= 0.10.40-18)
ConfigureParams: --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' --with-lispdir='${prefix}/share/emacs/site-lisp/%n' --disable-csharp --disable-libasprintf --disable-dependency-tracking

CompileScript: <<
cd gettext-tools && ./configure %c
cd gettext-tools && make
<<

InstallScript: <<
cd gettext-tools && make install DESTDIR=%d docdir=%p/share/doc/%n

rm -rf %i/bin %i/include %i/lib %i/share/aclocal %i/share/info %i/share/man %i/share/doc %i/share/gettext %i/share/locale

rm %i/share/emacs/site-lisp/gettext-emacs/*.elc

install -m 755 -d %i/lib/emacsen-common/packages/install
install -m 755 gettext-tools/fink/emacsen-install %i/lib/emacsen-common/packages/install/%n
install -m 755 -d %i/lib/emacsen-common/packages/remove
install -m 755 gettext-tools/fink/emacsen-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: README* AUTHORS COPYING NEWS THANKS PACKAGING

PostInstScript: <<
if [ -L %p/etc/alternatives/charset.alias ]; then
update-alternatives --remove charset.alias %p/lib/charset.alias.gettext
fi
%p/lib/emacsen-common/emacs-package-install %n
<<
PreRmScript: %p/lib/emacsen-common/emacs-package-remove %n

Description: Message localization support
DescDetail: <<
This package has the emacs files for gettext, not included in the main
package because of the large dependancy of emacs.
<<
DescPackaging: <<
Previous versions by Christoph Pfisterer.
<<
License: GPL/LGPL
Maintainer: Fink Core Group
Homepage: http://www.gnu.org/software/gettext/

gettext-emacs _unstable_ port .patch

diff -ruN gettext-0.14.5/gettext-tools/lib/execute.c gettext-0.14.5-patched/gettext-tools/lib/execute.c
--- gettext-0.14.5/gettext-tools/lib/execute.c 2005-05-20 13:19:48.000000000 -0700
+++ gettext-0.14.5-patched/gettext-tools/lib/execute.c 2006-08-14 05:21:26.000000000 -0700
@@ -62,7 +62,12 @@
#endif

#ifndef HAVE_ENVIRON_DECL
-extern char **environ;
+# ifdef __APPLE__
+# include
+# define environ (*_NSGetEnviron())
+# else
+ extern char **environ;
+# endif
#endif

#ifndef STDIN_FILENO
diff -ruN gettext-0.14.5/gettext-tools/lib/pipe.c gettext-0.14.5-patched/gettext-tools/lib/pipe.c
--- gettext-0.14.5/gettext-tools/lib/pipe.c 2005-05-20 13:25:23.000000000 -0700
+++ gettext-0.14.5-patched/gettext-tools/lib/pipe.c 2006-08-14 05:22:02.000000000 -0700
@@ -61,7 +61,12 @@
#endif

#ifndef HAVE_ENVIRON_DECL
-extern char **environ;
+# ifdef __APPLE__
+# include
+# define environ (*_NSGetEnviron())
+# else
+ extern char **environ;
+# endif
#endif

#ifndef STDIN_FILENO
diff -ruN gettext-0.13/gettext-tools/fink/emacsen-install gettext-0.13-patched/gettext-tools/fink/emacsen-install
--- gettext-0.13/gettext-tools/fink/emacsen-install Wed Dec 31 19:00:00 1969
+++ gettext-0.13-patched/gettext-tools/fink/emacsen-install Sun Nov 14 11:41:59 2004
@@ -0,0 +1,43 @@
+#! /bin/sh
+# @FINKPREFIX@/lib/emacsen-common/packages/install/gettext-emacs
+set -e
+
+FLAVOR=${1}
+PACKAGE=gettext-emacs
+
+echo install/${PACKAGE}: Handling install of emacsen flavor ${FLAVOR}
+
+el_files="po-mode.el po-compat.el"
+
+el_dir=@FINKPREFIX@/share/emacs/site-lisp/${PACKAGE}/
+elc_dir=@FINKPREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}/
+el_path_list=`for i in ${el_files}; do \
+ echo $i | perl -pe "s|^|${el_dir}|"; done`
+elc_path_list=`for i in ${el_files}; do \
+ echo $i | perl -pe "s|^|${elc_dir}|"; done`
+
+byte_compile_options="-batch -q --no-init-file --no-site-file"
+
+case $FLAVOR in
+ emacs20 | emacs21 )
+ echo install/${PACKAGE}: byte-compiling for ${FLAVOR}
+
+ install -m 755 -d ${elc_dir}
+
+ # Copy the temp .el files to the installation dir
+ cp ${el_path_list} ${elc_dir}
+
+ # Byte compile them
+ ${FLAVOR} ${byte_compile_options} ${elc_path_list}
+
+ # remove the redundant .el files
+ # presumes that any .el files in the dir are trash.
+ rm ${elc_dir}/*.el
+
+ ;;
+
+ * )
+ echo install/${PACKAGE}: Skipping unsupported flavor ${FLAVOR}
+ ;;
+esac
+
diff -ruN gettext-0.13/gettext-tools/fink/emacsen-remove gettext-0.13-patched/gettext-tools/fink/emacsen-remove
--- gettext-0.13/gettext-tools/fink/emacsen-remove Wed Dec 31 19:00:00 1969
+++ gettext-0.13-patched/gettext-tools/fink/emacsen-remove Sun Nov 14 11:42:23 2004
@@ -0,0 +1,18 @@
+#! /bin/sh
+# @FINKPREFIX@/lib/emacsen-common/packages/remove/gettext-emacs
+set -e
+
+FLAVOR=${1}
+PACKAGE=gettext-emacs
+
+echo remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR}
+
+case $FLAVOR in
+ emacs20 | emacs21 | xemacs21 )
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf @FINKPREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+ ;;
+ * )
+ echo remove/${PACKAGE}: Skipping unsupported flavor ${FLAVOR}
+ ;;
+esac