Revision: 90230 http://trac.macports.org/changeset/90230 Author: and.damore@macports.org Date: 2012-02-27 03:12:48 -0800 (Mon, 27 Feb 2012) Log Message: ----------- port lua-luahpdf: version updated, added license, changed homepage, setting right compiler and options, cleaner patch phase Modified Paths: -------------- trunk/dports/devel/lua-luahpdf/Portfile trunk/dports/devel/lua-luahpdf/files/patch-Makefile.diff Modified: trunk/dports/devel/lua-luahpdf/Portfile =================================================================== --- trunk/dports/devel/lua-luahpdf/Portfile 2012-02-27 10:44:51 UTC (rev 90229) +++ trunk/dports/devel/lua-luahpdf/Portfile 2012-02-27 11:12:48 UTC (rev 90230) @@ -3,7 +3,8 @@ PortSystem 1.0 name lua-luahpdf -version 0.1 +version 1.1 +license MIT categories devel platforms darwin maintainers and.damore openmaintainer @@ -17,11 +18,11 @@ encryption, Type1 and TrueType fonts, various character sets, outlines, \ links. -homepage http://www.keplerproject.org/copas/ -master_sites http://luaforge.net/frs/download.php/2145/ -checksums md5 5f6aba6532837f5255176cc41c89358a \ - sha1 184549f019254980f473d8da2b337069a6f197bf \ - rmd160 0feeb173ff7cce4d32112dedd3eb049fb98cd4de +homepage http://code.google.com/p/luahpdf/ +master_sites http://luahpdf.googlecode.com/files/ +checksums md5 960a8b3a7f05fc225ae1b5f0feb2efd7 \ + sha1 504c170769f1d13882ee9ccb15f55ad8b8e36799 \ + rmd160 3c282cc152627fd40963d3a75667b9a1667c3f41 distname luahpdf-${version} depends_lib port:lua \ @@ -29,7 +30,16 @@ patchfiles patch-Makefile.diff post-patch { - reinplace "s|^PREFIX.*\$|PREFIX=${prefix}|" ${worksrcpath}/Makefile + reinplace "s|%PREFIX%|${prefix}|" ${worksrcpath}/Makefile + reinplace "s|%COMPILER%|${configure.cc}|" ${worksrcpath}/Makefile } + use_configure no -build.target main + +build.env-append CFLAGS="-I${prefix}/include ${configure.cflags} [get_canonical_archflags cc]" \ + LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" + +post-destroot { + file rename ${destroot}${prefix}/share/doc/luahpdf ${destroot}${prefix}/share/doc/${name} +} + Modified: trunk/dports/devel/lua-luahpdf/files/patch-Makefile.diff =================================================================== --- trunk/dports/devel/lua-luahpdf/files/patch-Makefile.diff 2012-02-27 10:44:51 UTC (rev 90229) +++ trunk/dports/devel/lua-luahpdf/files/patch-Makefile.diff 2012-02-27 11:12:48 UTC (rev 90230) @@ -1,30 +1,20 @@ ---- Makefile.orig 2010-11-08 14:02:26.000000000 +0100 -+++ Makefile 2010-11-08 14:02:42.000000000 +0100 -@@ -4,6 +4,7 @@ - LIB = hpdf.so - TAR = $(PACKAGE).tar.gz - ZIP = $(PACKAGE).zip -+PREFIX=/. +--- Makefile.orig 2012-02-27 11:50:49.000000000 +0100 ++++ Makefile 2012-02-27 11:53:29.000000000 +0100 +@@ -1,7 +1,7 @@ + # --- Change the settings below to suit your environment. See explanations in + # --- the build documentation for more details. --- - PDF = \ - demo/arc_demo.pdf \ -@@ -29,6 +30,10 @@ - doc/html/index.html \ +-PREFIX=/usr/local ++PREFIX=%PREFIX% + MODDIR=$(PREFIX)/lib/lua/5.1 + DOCDIR=$(PREFIX)/share/doc/luahpdf + LUALIB=-llua +@@ -41,7 +41,7 @@ doc/html/license.html -+install : main -+ mkdir -p "$(DESTDIR)$(PREFIX)/lib/lua/5.1" -+ cp hpdf.so $(DESTDIR)$(PREFIX)/lib/lua/5.1 -+ - main : lib + $(TARGET) : hpdf.c +- cc -ansi -DHPDF_SHARED -pedantic -Wall -O2 $(CFLAGS) $(LDFLAGS) -o $@ $(LUAINC) $(HPDFINC) -shared $(LUALIB) $(HPDFLIB) $< ++ %COMPILER% -ansi -DHPDF_SHARED -pedantic -Wall $(CFLAGS) $(LDFLAGS) -o $@ $(LUAINC) $(HPDFINC) -shared $(LUALIB) $(HPDFLIB) $< - doc : $(HTML) -@@ -38,7 +43,7 @@ - lib : $(LIB) - - $(LIB) : hpdf.c -- cc -DHPDF_SHARED -ansi -pedantic -Wall -O2 -o $@ -shared -l hpdf $< -+ cc -DHPDF_SHARED -ansi -pedantic -Wall -O2 -o $@ -shared -l hpdf -l lua $< - - package : clean doc - rm -fr $(PACKAGE) + test : $(TARGET) + @lua -e "package.path=\"\" package.cpath=\"./?.so;./?.dll\" require \"hpdf\" print(hpdf.VERSION_TEXT)"
participants (1)
-
and.damore@macports.org