[135493] trunk/dports/editors/bluefish

devans at macports.org devans at macports.org
Fri Apr 24 14:03:22 PDT 2015


Revision: 135493
          https://trac.macports.org/changeset/135493
Author:   devans at macports.org
Date:     2015-04-24 14:03:22 -0700 (Fri, 24 Apr 2015)
Log Message:
-----------
bluefish: update to version 2.2.7, reconfigure using upstream autogen.sh for intltool 0.51 compatibility.

Modified Paths:
--------------
    trunk/dports/editors/bluefish/Portfile

Added Paths:
-----------
    trunk/dports/editors/bluefish/files/
    trunk/dports/editors/bluefish/files/autogen.sh

Modified: trunk/dports/editors/bluefish/Portfile
===================================================================
--- trunk/dports/editors/bluefish/Portfile	2015-04-24 20:14:14 UTC (rev 135492)
+++ trunk/dports/editors/bluefish/Portfile	2015-04-24 21:03:22 UTC (rev 135493)
@@ -4,8 +4,7 @@
 PortSystem          1.0
 
 name                bluefish
-version             2.2.4
-revision            1
+version             2.2.7
 license             GPL-3+
 categories          editors www
 platforms           darwin
@@ -22,13 +21,17 @@
 master_sites        sourceforge:project/bluefish/bluefish/${version} \
                     http://www.bennewitz.com/bluefish/stable/source/
 
-checksums           rmd160  56e8a1478ea6939cef0229fcfd40c44a52c49e83 \
-                    sha256  771621d848af6342fbab50a52bc7d6fddb29c4616f31ab939c508175c146b3a3
+checksums           rmd160  7a9fee51a5cc594beb74f70dc059c657d150474f \
+                    sha256  23534b73b929754e15b86d12904ca3ffc1b069da5dcd4f34a67e842fe9e858df
 
 use_bzip2           yes
 
 depends_build       port:pkgconfig \
-                    port:intltool
+                    port:intltool \
+                    port:gettext \
+                    port:autoconf \
+                    port:automake \
+                    port:libtool
 
 depends_lib         port:desktop-file-utils \
                     port:shared-mime-info \
@@ -37,38 +40,13 @@
                     port:enchant \
                     port:gucharmap
 
-# autoreconf to use MacPorts patched intltool.m4
-# update gettext files in po dirs to avoid gettext version mismatch errors during build
-# bluefish tarball version 2.2.4 includes files from gettext 0.17
-# we have gettext 0.18
+# reconfigure using upstream autogen.sh for intltool 0.51 compatibility
 
 post-patch {
-    set po_dirs         "src/plugin_about/po \
-                        src/plugin_charmap/po \
-                        src/plugin_entities/po \
-                        src/plugin_htmlbar/po \
-                        src/plugin_infbrowser/po \
-                        src/plugin_snippets/po \
-                        src/plugin_zencoding/po"
-
-    set gettext_files   "Makefile.in.in \
-                        boldquot.sed \
-                        en at boldquot.header \
-                        en at quot.header \
-                        insert-header.sin \
-                        quot.sed \
-                        remove-potcdate.sin \
-                        Rules-quot"
-
-    foreach po_dir ${po_dirs} {
-        foreach gettext_file ${gettext_files} {
-            copy -force ${prefix}/share/gettext/po/${gettext_file} ${worksrcpath}/${po_dir}
-        }
-    }
+    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
 }
 
-use_autoreconf      yes
-autoreconf.args     -fvi
+configure.cmd       ./autogen.sh && ./configure
 
 configure.args      --with-gtk2=no \
                     --disable-update-databases \

Added: trunk/dports/editors/bluefish/files/autogen.sh
===================================================================
--- trunk/dports/editors/bluefish/files/autogen.sh	                        (rev 0)
+++ trunk/dports/editors/bluefish/files/autogen.sh	2015-04-24 21:03:22 UTC (rev 135493)
@@ -0,0 +1,185 @@
+#!/bin/bash
+#
+# $Id: autogen.sh,v 1.11 2008-05-06 14:44:52 dleidert Exp $
+
+set -e
+
+## all initial declarations, overwrite them using e.g. 'ACLOCAL=aclocal-1.8 AUTOMAKE=automake-1.8 ./autogen.sh'
+ACLOCAL=${ACLOCAL:-aclocal}
+AUTOCONF=${AUTOCONF:-autoconf}
+AUTOHEADER=${AUTOHEADER:-autoheader}
+AUTOMAKE=${AUTOMAKE:-automake}
+GETTEXTIZE=${GETTEXTIZE:-gettextize}
+INTLTOOLIZE=${INTLTOOLIZE:-intltoolize}
+LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}
+
+## check, if all binaries exist and fail with error 1 if not
+if [ -z `which $ACLOCAL` ] ; then echo "Error. ACLOCAL=$ACLOCAL not found." >&2 && exit 1 ; fi
+if [ -z `which $AUTOCONF` ] ; then echo "Error. AUTOCONF=$AUTOCONF not found." >&2 && exit 1 ; fi
+if [ -z `which $AUTOHEADER` ] ; then echo "Error. AUTOHEADER=$AUTOHEADER not found." >&2 && exit 1 ; fi
+if [ -z `which $AUTOMAKE` ] ; then echo "Error. AUTOMAKE=$AUTOMAKE not found." >&2 && exit 1 ; fi
+if [ -z `which $GETTEXTIZE` ] ; then echo "Error. GETTEXTIZE=$GETTEXTIZE not found." >&2 && exit 1 ; fi
+if [ -z `which $INTLTOOLIZE` ] ; then echo "Error. INTLTOOLIZE=$INTLTOOLIZE not found." >&2 && exit 1 ; fi
+if [ -z `which $LIBTOOLIZE` ] ; then echo "Error. LIBTOOLIZE=$LIBTOOLIZE not found." >&2 && exit 1 ; fi
+
+## find where automake is installed and get the version
+AUTOMAKE_PATH=${AUTOMAKE_PATH:-`which $AUTOMAKE | sed 's|\/bin\/automake.*||'`}
+AUTOMAKE_VERSION=`$AUTOMAKE --version | grep automake | awk '{print $4}' | awk -F. '{print $1"."$2}'`
+
+## find gettext version. Use GETTEXTIZE since it is already initialized
+GETTEXT_VERSION=`$GETTEXTIZE --version | grep gettextize | awk '{print $4}' | awk -F. '{print $1"."$2}'`
+
+## automake files we need to have inside our source
+if [[ $AUTOMAKE_VERSION = "1.7" || $GETTEXT_VERSION < "0.15" ]] ; then
+        AUTOMAKE_FILES="missing mkinstalldirs install-sh"
+else
+        AUTOMAKE_FILES="missing install-sh"
+fi
+
+## the directories which will contain the $GETTEXT_FILES
+GETTEXT_PO_DIRS="
+src/plugin_about/po
+src/plugin_charmap/po
+src/plugin_entities/po
+src/plugin_htmlbar/po
+src/plugin_infbrowser/po
+src/plugin_snippets/po
+src/plugin_xmltools/po
+src/plugin_zencoding/po
+"
+
+## the gettext files we need to copy to $GETTEXT_PO_DIRS
+GETTEXT_FILES="
+Makefile.in.in
+boldquot.sed
+en at boldquot.header
+en at quot.header
+insert-header.sin
+quot.sed
+remove-potcdate.sin
+Rules-quot
+"
+
+## the prefix where we expect share/gettext/po/$GETTEXT_FILES files
+GETTEXT_LOCATION_LIST="
+`which $GETTEXTIZE | sed 's|\/bin\/gettextize|\/share\/gettext\/po|'`
+`echo $PATH | tr ':' '\n' | sed 's|bin|share|;s|$|\/gettext\/po|g'`
+/usr/share/gettext/po
+/usr/local/share/gettext/po
+"
+
+## use $GETTEXT_LOCATION to add a custom gettext location prefix
+GETTEXT_LOCATION=${GETTEXT_LOCATION:-$GETTEXT_LOCATION_LIST}
+
+## check if $GETTEXT_LOCATION contains the files we need and set $GETTEXT_DIR
+for dir in $GETTEXT_LOCATION  ; do
+	if [ -f $dir/Makefile.in.in ] ; then
+		GETTEXT_DIR=$dir
+		break
+	fi
+done
+
+## if $GETTEXT_DIR is still undefined, fail with error 1
+if [ -z $GETTEXT_DIR ] ; then
+	echo "Error. GETTEXT_LOCATION=$GETTEXT_LOCATION_LIST does not exist." >&2
+	exit 1
+fi
+
+## our help output - if autogen.sh was called with -h|--help or unkbown option
+autogen_help() {
+	echo
+	echo "autogen.sh usage:"
+	echo
+	echo "  Produces all files necessary to build the bluefish project files."
+	echo "  The files are linked by default, if you run ./autogen.sh without an option."
+	echo
+	echo "    -v        Be more verbose about every step (debugging)."
+	echo "    -f FILE   Output everything to FILE (debugging). Useful for debug output."
+	echo "    -c        Copy files instead to link them."
+	echo "    -h        Print this message."
+	echo
+	echo "  You can overwrite the automatically determined location of aclocal (>= 1.8),"
+	echo "  automake (>= 1.8), autoheader, autoconf, libtoolize, intltoolize and"
+	echo "  gettextize using:"
+	echo
+	echo "    ACLOCAL=/foo/bin/aclocal-1.9 AUTOMAKE=automake-1.9 ./autogen.sh"
+	echo
+}
+
+## copy $GETTEXT_FILES from $GETTEXT_DIR into $GETTEXT_PO_DIRS
+## this will probably become obsolete with gettext 0.16.2, which adds the
+## necessary functionality to gettextize - we should prefer this way then
+prepare_gettext() {
+	for dir in $GETTEXT_PO_DIRS ; do
+		if [ -d $dir ] ; then
+			for file in $GETTEXT_FILES ; do
+				if [ -n "$VERBOSE" ]; then
+					echo "DEBUG: $COPYACTION -f $GETTEXT_DIR/$file `pwd`/$dir" >&2
+				fi
+				$COPYACTION -f $GETTEXT_DIR/$file `pwd`/$dir
+			done
+		else
+			echo "ERROR: $dir does not exist!"
+			break
+		fi
+	done
+}
+
+## check if $AUTOMAKE_FILES were copied to our source
+## link/copy them if not - necessary for e.g. gettext, which seems to always need mkinstalldirs
+autogen_if_missing() {
+	for file in $AUTOMAKE_FILES ; do
+		if [ ! -e "$file" ] ; then
+			if [ -n "$VERBOSE" ]; then
+				echo "DEBUG: $COPYACTION -f $AUTOMAKE_PATH/share/automake-$AUTOMAKE_VERSION/$file ." >&2
+			fi
+			$COPYACTION -f $AUTOMAKE_PATH/share/automake-$AUTOMAKE_VERSION/$file .
+		fi
+	done
+}
+
+## link/copy the necessary files to our source to prepare for a build
+autogen() {
+	$LIBTOOLIZE $DEBUG -f $COPYOPTION
+	$INTLTOOLIZE $DEBUG -f $COPYOPTION
+	prepare_gettext
+	$ACLOCAL $ACLOCAL_OPT --force $VERBOSE
+	$AUTOHEADER -f $DEBUG $VERBOSE
+	$AUTOMAKE --gnu -a $VERBOSE $COPYOPTION
+	autogen_if_missing
+	$AUTOCONF $DEBUG $VERBOSE
+}
+
+## the main function
+COPYACTION="ln -s"
+while getopts "chvf:" options; do
+	case "$options" in
+		h)
+			autogen_help
+			exit 0
+		;;
+		c)
+			COPYACTION="cp"
+			COPYOPTION="-c"
+		;;
+		f)
+			OUTPUTFILE=$OPTARG
+		;;
+		v)
+			DEBUG="--debug"
+			VERBOSE="--verbose"
+			set -x
+		;;
+	esac
+done
+
+if [ -n "$OUTPUTFILE" ]; then
+	exec &>$OUTPUTFILE
+fi
+autogen
+
+## ready to rumble
+echo "Run ./configure with the appropriate options, then make and enjoy."
+
+exit 0
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150424/40022167/attachment.html>


More information about the macports-changes mailing list