[118684] trunk/dports/sysutils/txt2regex

ryandesign at macports.org ryandesign at macports.org
Mon Apr 7 20:23:19 PDT 2014


Revision: 118684
          https://trac.macports.org/changeset/118684
Author:   ryandesign at macports.org
Date:     2014-04-07 20:23:19 -0700 (Mon, 07 Apr 2014)
Log Message:
-----------
txt2regex: fix build failure on Mountain Lion and later (sed: RE error: illegal byte sequence) by setting LC_CTYPE=C (#43268); fix Makefile to handle PREFIX and DESTDIR correctly; install manpage; noarch; license GPL-2; add gettext build dependency (#32533)

Modified Paths:
--------------
    trunk/dports/sysutils/txt2regex/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/txt2regex/files/
    trunk/dports/sysutils/txt2regex/files/patch-Makefile.diff

Modified: trunk/dports/sysutils/txt2regex/Portfile
===================================================================
--- trunk/dports/sysutils/txt2regex/Portfile	2014-04-08 03:03:08 UTC (rev 118683)
+++ trunk/dports/sysutils/txt2regex/Portfile	2014-04-08 03:23:19 UTC (rev 118684)
@@ -4,9 +4,13 @@
 
 name            txt2regex
 version         0.8
+revision        1
 categories      sysutils
 platforms       darwin freebsd
 maintainers     technokracy.net:grrr
+supported_archs noarch
+license         GPL-2
+
 description     Converts human sentences to regexes
 
 long_description \
@@ -24,13 +28,17 @@
                 sha1 367923b1dad95c68b8e46db6888135b8b8d00807 \
                 rmd160 03387e1a43b17b7a977bcd8a5beb9b48c3cff24c
 
+depends_build   port:gettext
+
+patchfiles      patch-Makefile.diff
+
 use_configure   no
 build           {}
 
-destroot {
-    xinstall -m 555 ${worksrcpath}/${name}-${version}.sh ${destroot}${prefix}/bin/${name}
-    xinstall -m 444 ${worksrcpath}/${name}.man ${destroot}${prefix}/share/man/man1
-}
+destroot.args   PREFIX=${prefix}
 
+# sed: RE error: illegal byte sequence
+destroot.env    LC_CTYPE=C
+
 livecheck.type  regex
 livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}

Added: trunk/dports/sysutils/txt2regex/files/patch-Makefile.diff
===================================================================
--- trunk/dports/sysutils/txt2regex/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/sysutils/txt2regex/files/patch-Makefile.diff	2014-04-08 03:23:19 UTC (rev 118684)
@@ -0,0 +1,74 @@
+--- Makefile.orig	2004-09-28 16:04:55.000000000 -0500
++++ Makefile	2011-12-13 23:38:07.000000000 -0600
+@@ -9,10 +9,11 @@
+ FILES = Makefile README README.japanese NEWS Changelog COPYRIGHT TODO $(SHSKEL) $(PODIR) tools $(TESTDIR) $(NAME).man 
+ 
+ 
++PREFIX = /usr
+ DESTDIR = 
+-BINDIR	= $(DESTDIR)/usr/bin
+-LOCALEDIR = $(DESTDIR)/usr/share/locale
+-MANDIR = $(DESTDIR)/usr/share/man/man1
++BINDIR = $(PREFIX)/bin
++LOCALEDIR = $(PREFIX)/share/locale
++MANDIR = $(PREFIX)/share/man/man1
+ 
+ TARGET=all
+ 
+@@ -48,7 +48,7 @@
+ po: check-po-dir
+ 	@cd $(PODIR) && \
+ 	for pot in *.po; do \
+-		echo -n "merging $$pot..."; \
++		printf "merging $$pot..."; \
+ 		poti=`echo $$pot | sed 's/\.po$$//'`; \
+ 		cp $$pot $$pot.old && \
+ 		msgmerge $$pot.old $(NAME).pot > $$pot; \
+@@ -57,7 +57,7 @@
+ mo: check-po-dir
+ 	@cd $(PODIR) && \
+ 	for pot in *.po; do \
+-		echo -n "compiling $$pot..."; \
++		printf "compiling $$pot..."; \
+ 		poti=`echo $$pot | sed 's/\.po$$//'`; \
+ 		msgfmt -o $$poti.mo $$pot && \
+ 		echo ok; \
+@@ -66,7 +66,7 @@
+ check-po: check-po-dir
+ 	@cd $(PODIR) && \
+ 	for pot in *.po; do \
+-		echo -n "checking $$pot... "; \
++		printf "checking $$pot... "; \
+ 		msgfmt -v $$pot || exit 1; \
+ 	done
+ 
+@@ -79,20 +80,22 @@
+ 	tar cvzf $(DISTDIR).tgz $(DISTDIR) && \
+ 	rm -rf $(DISTDIR)
+ 
+-#TODO install man page and README
++#TODO install README
+ install: mo
+-	@[ -d $(LOCALEDIR) ] || mkdir -p $(LOCALEDIR); \
+-	[ -d $(BINDIR) ] || mkdir -p $(BINDIR); \
++	@[ -d $(DESTDIR)$(LOCALEDIR) ] || mkdir -p $(DESTDIR)$(LOCALEDIR); \
++	[ -d $(DESTDIR)$(MANDIR) ] || mkdir -p $(DESTDIR)$(MANDIR); \
++	[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR); \
+ 	for pot in `cd $(PODIR) && ls *.mo`; do \
+ 		poti=`echo $$pot | sed 's/\.mo$$//'`; \
+-		modir=$(LOCALEDIR)/$$poti/LC_MESSAGES; \
++		modir=$(DESTDIR)$(LOCALEDIR)/$$poti/LC_MESSAGES; \
+ 		[ -d $$modir ] || mkdir -p $$modir; \
+ 		install -m644 $(PODIR)/$$pot $$modir/$(NAME).mo; \
+ 	done; \
++	install -m644 $(NAME).man $(DESTDIR)$(MANDIR)/$(NAME).1
+ 	sed -e '/^TEXTDOMAINDIR=/s,=.*,=$(LOCALEDIR),' \
+-	    -e '/^VERSION=/s/=.*/=$(VERSION)/' $(SHSKEL) > $(BINDIR)/$(NAME) && \
+-	chmod +x $(BINDIR)/$(NAME) && \
+-	echo "program '$(NAME)' installed. just run $(BINDIR)/$(NAME)"
++	    -e '/^VERSION=/s/=.*/=$(VERSION)/' $(SHSKEL) > $(DESTDIR)$(BINDIR)/$(NAME) && \
++	chmod +x $(DESTDIR)$(BINDIR)/$(NAME) && \
++	echo "program '$(NAME)' installed. just run $(DESTDIR)$(BINDIR)/$(NAME)"
+ 
+ ###DEVELOPPER ONLY###	
+ doc:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140407/88beae95/attachment.html>


More information about the macports-changes mailing list