diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-04-08 19:40:29 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-04-08 19:40:29 +0000 |
commit | 991d7abc50e287cd848047ec51d40af3c7e6e677 (patch) | |
tree | 75b1a70ae982503b3ca614f278a4d67482fa16de /textproc/highlight | |
parent | 5ccd8b045f05fb2e1dbe9a8ec354dea1c17f55b6 (diff) | |
download | pkgsrc-991d7abc50e287cd848047ec51d40af3c7e6e677.tar.gz |
Extract libhighlight (libtoolized for portability) to its own
package, which highlight and p5-highlight buildlink instead of making
their own static copies (so bump their PKGREVISIONS). While here, fix
build on SmartOS.
Diffstat (limited to 'textproc/highlight')
-rw-r--r-- | textproc/highlight/Makefile | 9 | ||||
-rw-r--r-- | textproc/highlight/Makefile.common | 3 | ||||
-rw-r--r-- | textproc/highlight/PLIST | 314 | ||||
-rw-r--r-- | textproc/highlight/distinfo | 9 | ||||
-rw-r--r-- | textproc/highlight/patches/patch-examples_swig_makefile | 12 | ||||
-rw-r--r-- | textproc/highlight/patches/patch-makefile | 38 | ||||
-rw-r--r-- | textproc/highlight/patches/patch-src_core_platform__fs.cpp | 22 | ||||
-rw-r--r-- | textproc/highlight/patches/patch-src_makefile | 59 |
8 files changed, 132 insertions, 334 deletions
diff --git a/textproc/highlight/Makefile b/textproc/highlight/Makefile index d313043c02e..13c79ed52ae 100644 --- a/textproc/highlight/Makefile +++ b/textproc/highlight/Makefile @@ -1,14 +1,13 @@ -# $NetBSD: Makefile,v 1.9 2014/08/18 01:21:49 schmonz Exp $ +# $NetBSD: Makefile,v 1.10 2018/04/08 19:40:29 schmonz Exp $ +PKGREVISION= 1 .include "../../textproc/highlight/Makefile.common" MANCOMPRESSED= yes BUILD_TARGET= cli - -EGDIR= ${PREFIX}/share/examples/highlight -CONF_FILES= ${EGDIR}/filetypes.conf \ - ${PKG_SYSCONFDIR}/filetypes.conf +INSTALL_TARGET= install-cli .include "../../devel/libgetopt/buildlink3.mk" +.include "../../textproc/libhighlight/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/textproc/highlight/Makefile.common b/textproc/highlight/Makefile.common index f1941d5f541..12fc73ebd8e 100644 --- a/textproc/highlight/Makefile.common +++ b/textproc/highlight/Makefile.common @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.common,v 1.1 2014/08/18 01:21:49 schmonz Exp $ +# $NetBSD: Makefile.common,v 1.2 2018/04/08 19:40:29 schmonz Exp $ # used by textproc/highlight/Makefile +# used by textproc/libhighlight/Makefile # used by textproc/p5-highlight/Makefile DISTNAME= highlight-${VERSION} diff --git a/textproc/highlight/PLIST b/textproc/highlight/PLIST index d9de4b327f7..6b735670409 100644 --- a/textproc/highlight/PLIST +++ b/textproc/highlight/PLIST @@ -1,315 +1,3 @@ -@comment $NetBSD: PLIST,v 1.5 2014/08/09 16:55:03 schmonz Exp $ +@comment $NetBSD: PLIST,v 1.6 2018/04/08 19:40:29 schmonz Exp $ bin/highlight man/man1/highlight.1 -share/doc/highlight/AUTHORS -share/doc/highlight/COPYING -share/doc/highlight/ChangeLog -share/doc/highlight/INSTALL -share/doc/highlight/README -share/doc/highlight/README_DE -share/doc/highlight/README_LANGLIST -share/doc/highlight/README_REGEX -share/doc/highlight/README_SWIG -share/doc/highlight/examples/highlight_pipe.php -share/doc/highlight/examples/highlight_pipe.pm -share/doc/highlight/examples/highlight_pipe.py -share/doc/highlight/examples/swig/highlight.i -share/doc/highlight/examples/swig/makefile -share/doc/highlight/examples/swig/testmod.pl -share/doc/highlight/examples/swig/testmod.py -share/doc/highlight/examples/web_plugins/dokuwiki/syntax.php -share/doc/highlight/examples/web_plugins/movabletype/README -share/doc/highlight/examples/web_plugins/movabletype/highlight.pl -share/doc/highlight/examples/web_plugins/wordpress/README -share/doc/highlight/examples/web_plugins/wordpress/highlight.php -share/examples/highlight/filetypes.conf -share/highlight/langDefs/abap4.lang -share/highlight/langDefs/abc.lang -share/highlight/langDefs/abnf.lang -share/highlight/langDefs/actionscript.lang -share/highlight/langDefs/ada.lang -share/highlight/langDefs/agda.lang -share/highlight/langDefs/algol.lang -share/highlight/langDefs/ampl.lang -share/highlight/langDefs/amtrix.lang -share/highlight/langDefs/applescript.lang -share/highlight/langDefs/arc.lang -share/highlight/langDefs/arm.lang -share/highlight/langDefs/as400cl.lang -share/highlight/langDefs/ascend.lang -share/highlight/langDefs/asp.lang -share/highlight/langDefs/aspect.lang -share/highlight/langDefs/assembler.lang -share/highlight/langDefs/ats.lang -share/highlight/langDefs/autohotkey.lang -share/highlight/langDefs/autoit.lang -share/highlight/langDefs/avenue.lang -share/highlight/langDefs/awk.lang -share/highlight/langDefs/bat.lang -share/highlight/langDefs/bbcode.lang -share/highlight/langDefs/bcpl.lang -share/highlight/langDefs/bibtex.lang -share/highlight/langDefs/biferno.lang -share/highlight/langDefs/bison.lang -share/highlight/langDefs/blitzbasic.lang -share/highlight/langDefs/bms.lang -share/highlight/langDefs/bnf.lang -share/highlight/langDefs/boo.lang -share/highlight/langDefs/c.lang -share/highlight/langDefs/ceylon.lang -share/highlight/langDefs/charmm.lang -share/highlight/langDefs/chill.lang -share/highlight/langDefs/clean.lang -share/highlight/langDefs/clearbasic.lang -share/highlight/langDefs/clipper.lang -share/highlight/langDefs/clojure.lang -share/highlight/langDefs/clp.lang -share/highlight/langDefs/cobol.lang -share/highlight/langDefs/coldfusion.lang -share/highlight/langDefs/crk.lang -share/highlight/langDefs/csharp.lang -share/highlight/langDefs/css.lang -share/highlight/langDefs/d.lang -share/highlight/langDefs/dart.lang -share/highlight/langDefs/diff.lang -share/highlight/langDefs/dylan.lang -share/highlight/langDefs/ebnf.lang -share/highlight/langDefs/eiffel.lang -share/highlight/langDefs/erlang.lang -share/highlight/langDefs/euphoria.lang -share/highlight/langDefs/express.lang -share/highlight/langDefs/fame.lang -share/highlight/langDefs/felix.lang -share/highlight/langDefs/fortran77.lang -share/highlight/langDefs/fortran90.lang -share/highlight/langDefs/frink.lang -share/highlight/langDefs/fsharp.lang -share/highlight/langDefs/fx.lang -share/highlight/langDefs/gambas.lang -share/highlight/langDefs/gdb.lang -share/highlight/langDefs/go.lang -share/highlight/langDefs/graphviz.lang -share/highlight/langDefs/haskell.lang -share/highlight/langDefs/haxe.lang -share/highlight/langDefs/hcl.lang -share/highlight/langDefs/html.lang -share/highlight/langDefs/httpd.lang -share/highlight/langDefs/icon.lang -share/highlight/langDefs/idl.lang -share/highlight/langDefs/idlang.lang -share/highlight/langDefs/inc_luatex.lang -share/highlight/langDefs/informix.lang -share/highlight/langDefs/ini.lang -share/highlight/langDefs/innosetup.lang -share/highlight/langDefs/interlis.lang -share/highlight/langDefs/io.lang -share/highlight/langDefs/jasmin.lang -share/highlight/langDefs/java.lang -share/highlight/langDefs/js.lang -share/highlight/langDefs/jsp.lang -share/highlight/langDefs/ldif.lang -share/highlight/langDefs/lhs.lang -share/highlight/langDefs/lilypond.lang -share/highlight/langDefs/limbo.lang -share/highlight/langDefs/lindenscript.lang -share/highlight/langDefs/lisp.lang -share/highlight/langDefs/logtalk.lang -share/highlight/langDefs/lotos.lang -share/highlight/langDefs/lotus.lang -share/highlight/langDefs/lua.lang -share/highlight/langDefs/luban.lang -share/highlight/langDefs/make.lang -share/highlight/langDefs/maple.lang -share/highlight/langDefs/matlab.lang -share/highlight/langDefs/maya.lang -share/highlight/langDefs/mercury.lang -share/highlight/langDefs/miranda.lang -share/highlight/langDefs/mod2.lang -share/highlight/langDefs/mod3.lang -share/highlight/langDefs/modelica.lang -share/highlight/langDefs/moon.lang -share/highlight/langDefs/ms.lang -share/highlight/langDefs/mssql.lang -share/highlight/langDefs/mxml.lang -share/highlight/langDefs/n3.lang -share/highlight/langDefs/nasal.lang -share/highlight/langDefs/nbc.lang -share/highlight/langDefs/nemerle.lang -share/highlight/langDefs/netrexx.lang -share/highlight/langDefs/nice.lang -share/highlight/langDefs/nsis.lang -share/highlight/langDefs/nxc.lang -share/highlight/langDefs/oberon.lang -share/highlight/langDefs/objc.lang -share/highlight/langDefs/ocaml.lang -share/highlight/langDefs/octave.lang -share/highlight/langDefs/oorexx.lang -share/highlight/langDefs/os.lang -share/highlight/langDefs/oz.lang -share/highlight/langDefs/paradox.lang -share/highlight/langDefs/pas.lang -share/highlight/langDefs/pdf.lang -share/highlight/langDefs/perl.lang -share/highlight/langDefs/php.lang -share/highlight/langDefs/pike.lang -share/highlight/langDefs/pl1.lang -share/highlight/langDefs/plperl.lang -share/highlight/langDefs/plpython.lang -share/highlight/langDefs/pltcl.lang -share/highlight/langDefs/pov.lang -share/highlight/langDefs/pro.lang -share/highlight/langDefs/progress.lang -share/highlight/langDefs/ps.lang -share/highlight/langDefs/ps1.lang -share/highlight/langDefs/psl.lang -share/highlight/langDefs/pure.lang -share/highlight/langDefs/pyrex.lang -share/highlight/langDefs/python.lang -share/highlight/langDefs/q.lang -share/highlight/langDefs/qmake.lang -share/highlight/langDefs/qu.lang -share/highlight/langDefs/r.lang -share/highlight/langDefs/rebol.lang -share/highlight/langDefs/rexx.lang -share/highlight/langDefs/rnc.lang -share/highlight/langDefs/rpg.lang -share/highlight/langDefs/rpl.lang -share/highlight/langDefs/ruby.lang -share/highlight/langDefs/s.lang -share/highlight/langDefs/sas.lang -share/highlight/langDefs/scala.lang -share/highlight/langDefs/scilab.lang -share/highlight/langDefs/sh.lang -share/highlight/langDefs/small.lang -share/highlight/langDefs/smalltalk.lang -share/highlight/langDefs/sml.lang -share/highlight/langDefs/snmp.lang -share/highlight/langDefs/snobol.lang -share/highlight/langDefs/spec.lang -share/highlight/langDefs/spn.lang -share/highlight/langDefs/sql.lang -share/highlight/langDefs/squirrel.lang -share/highlight/langDefs/sybase.lang -share/highlight/langDefs/tcl.lang -share/highlight/langDefs/tcsh.lang -share/highlight/langDefs/tex.lang -share/highlight/langDefs/ts.lang -share/highlight/langDefs/tsql.lang -share/highlight/langDefs/ttcn3.lang -share/highlight/langDefs/txt.lang -share/highlight/langDefs/upc.lang -share/highlight/langDefs/vala.lang -share/highlight/langDefs/vb.lang -share/highlight/langDefs/verilog.lang -share/highlight/langDefs/vhd.lang -share/highlight/langDefs/xml.lang -share/highlight/langDefs/xpp.lang -share/highlight/langDefs/yaiff.lang -share/highlight/langDefs/yang.lang -share/highlight/langDefs/znn.lang -share/highlight/plugins/asciidoc_html_add_links.lua -share/highlight/plugins/bash_functions.lua -share/highlight/plugins/bash_ref_linuxmanpages_com.lua -share/highlight/plugins/cpp_qt.lua -share/highlight/plugins/cpp_ref_cplusplus_com.lua -share/highlight/plugins/cpp_ref_gtk_gnome_org.lua -share/highlight/plugins/cpp_ref_local_includes.lua -share/highlight/plugins/cpp_ref_qtproject_org.lua -share/highlight/plugins/cpp_ref_wxwidgets_org.lua -share/highlight/plugins/cpp_syslog.lua -share/highlight/plugins/cpp_wx.lua -share/highlight/plugins/ctags_html_tooltips.lua -share/highlight/plugins/java_library.lua -share/highlight/plugins/keywords_capitalize.lua -share/highlight/plugins/keywords_lowercase.lua -share/highlight/plugins/keywords_uppercase.lua -share/highlight/plugins/outhtml_curly_brackets_matcher.lua -share/highlight/plugins/outhtml_keyword_matcher.lua -share/highlight/plugins/outhtml_parantheses_matcher.lua -share/highlight/plugins/perl_ref_perl_org.lua -share/highlight/plugins/python_ref_python_org.lua -share/highlight/plugins/scala_ref_scala_lang_org.lua -share/highlight/plugins/theme_invert.lua -share/highlight/plugins/token_add_state_ids.lua -share/highlight/themes/acid.theme -share/highlight/themes/aiseered.theme -share/highlight/themes/andes.theme -share/highlight/themes/anotherdark.theme -share/highlight/themes/autumn.theme -share/highlight/themes/baycomb.theme -share/highlight/themes/bclear.theme -share/highlight/themes/biogoo.theme -share/highlight/themes/bipolar.theme -share/highlight/themes/blacknblue.theme -share/highlight/themes/bluegreen.theme -share/highlight/themes/breeze.theme -share/highlight/themes/bright.theme -share/highlight/themes/camo.theme -share/highlight/themes/candy.theme -share/highlight/themes/clarity.theme -share/highlight/themes/dante.theme -share/highlight/themes/darkblue.theme -share/highlight/themes/darkbone.theme -share/highlight/themes/darkness.theme -share/highlight/themes/darkslategray.theme -share/highlight/themes/darkspectrum.theme -share/highlight/themes/denim.theme -share/highlight/themes/dusk.theme -share/highlight/themes/earendel.theme -share/highlight/themes/easter.theme -share/highlight/themes/edit-anjuta.theme -share/highlight/themes/edit-eclipse.theme -share/highlight/themes/edit-emacs.theme -share/highlight/themes/edit-flashdevelop.theme -share/highlight/themes/edit-gedit.theme -share/highlight/themes/edit-jedit.theme -share/highlight/themes/edit-kwrite.theme -share/highlight/themes/edit-matlab.theme -share/highlight/themes/edit-msvs2008.theme -share/highlight/themes/edit-nedit.theme -share/highlight/themes/edit-vim-dark.theme -share/highlight/themes/edit-vim.theme -share/highlight/themes/edit-xcode.theme -share/highlight/themes/ekvoli.theme -share/highlight/themes/fine_blue.theme -share/highlight/themes/freya.theme -share/highlight/themes/fruit.theme -share/highlight/themes/golden.theme -share/highlight/themes/greenlcd.theme -share/highlight/themes/kellys.theme -share/highlight/themes/leo.theme -share/highlight/themes/lucretia.theme -share/highlight/themes/manxome.theme -share/highlight/themes/maroloccio.theme -share/highlight/themes/matrix.theme -share/highlight/themes/moe.theme -share/highlight/themes/molokai.theme -share/highlight/themes/moria.theme -share/highlight/themes/navajo-night.theme -share/highlight/themes/navy.theme -share/highlight/themes/neon.theme -share/highlight/themes/night.theme -share/highlight/themes/nightshimmer.theme -share/highlight/themes/nuvola.theme -share/highlight/themes/olive.theme -share/highlight/themes/orion.theme -share/highlight/themes/oxygenated.theme -share/highlight/themes/pablo.theme -share/highlight/themes/peaksea.theme -share/highlight/themes/print.theme -share/highlight/themes/rand01.theme -share/highlight/themes/rdark.theme -share/highlight/themes/relaxedgreen.theme -share/highlight/themes/rootwater.theme -share/highlight/themes/seashell.theme -share/highlight/themes/solarized-dark.theme -share/highlight/themes/solarized-light.theme -share/highlight/themes/tabula.theme -share/highlight/themes/tcsoft.theme -share/highlight/themes/the.theme -share/highlight/themes/vampire.theme -share/highlight/themes/whitengrey.theme -share/highlight/themes/xoria256.theme -share/highlight/themes/zellner.theme -share/highlight/themes/zenburn.theme -share/highlight/themes/zmrok.theme diff --git a/textproc/highlight/distinfo b/textproc/highlight/distinfo index 0c06061f628..289ded1a2c8 100644 --- a/textproc/highlight/distinfo +++ b/textproc/highlight/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.10 2018/03/31 06:05:40 schmonz Exp $ +$NetBSD: distinfo,v 1.11 2018/04/08 19:40:29 schmonz Exp $ SHA1 (highlight-3.18.tar.bz2) = 985d0a3c707e3251fe50ffff66e11a8563777202 RMD160 (highlight-3.18.tar.bz2) = 960b2a9ed6071b0f48ef45da2d006f5f00d9b578 SHA512 (highlight-3.18.tar.bz2) = 1f939e117209e96d021216addc281ca7f265822f053f577ed7cb11b8ac9a1762bf84f8e1f9f5e67277004573b98e4b8732f48549aa674fe6801bfc1c0627b930 Size (highlight-3.18.tar.bz2) = 619669 bytes -SHA1 (patch-examples_swig_makefile) = f46b559e8bb6c03a8af2a209b3ce79a4144d4044 -SHA1 (patch-makefile) = 1cf4c6225b36e822a40ec10917384367914ecb0f -SHA1 (patch-src_makefile) = 592b8a2934d7e4c7f3c5a241737f4d09215932a4 +SHA1 (patch-examples_swig_makefile) = 5b53c835e51ecbd6b0fb4865fa33b7702d47bdb1 +SHA1 (patch-makefile) = edfe212807ceba6d10873b9d75fff9570280a447 +SHA1 (patch-src_core_platform__fs.cpp) = ae4f901da24307b2b7699809ea959976fd95f16f +SHA1 (patch-src_makefile) = e1c922af02516661a167d3d5a43e194fe1e97c60 diff --git a/textproc/highlight/patches/patch-examples_swig_makefile b/textproc/highlight/patches/patch-examples_swig_makefile index d6391f6f52e..3339f83b5b7 100644 --- a/textproc/highlight/patches/patch-examples_swig_makefile +++ b/textproc/highlight/patches/patch-examples_swig_makefile @@ -1,4 +1,4 @@ -$NetBSD: patch-examples_swig_makefile,v 1.3 2018/03/31 06:05:40 schmonz Exp $ +$NetBSD: patch-examples_swig_makefile,v 1.4 2018/04/08 19:40:29 schmonz Exp $ Use pkgsrc-specified compiler and flags. @@ -13,7 +13,15 @@ Use pkgsrc-specified compiler and flags. HL_INC=../../src/include/ HL_SRC=../../src/ -@@ -18,18 +18,18 @@ lib-stamp: +@@ -12,24 +12,24 @@ PERL_INC=$(shell perl -MExtUtils::Embed + PHP_INC=$(shell php-config --includes) + + lib-stamp: +- make -C ${HL_SRC} -f ./makefile clean +- PIC=1 make -C ${HL_SRC} -f ./makefile CFLAGS="${CFLAGS}" libhighlight.a ++ #make -C ${HL_SRC} -f ./makefile clean ++ #PIC=1 make -C ${HL_SRC} -f ./makefile CFLAGS="${CFLAGS}" libhighlight.a + touch $@ python: lib-stamp swig -c++ -python -o highlight_wrap.cpp highlight.i diff --git a/textproc/highlight/patches/patch-makefile b/textproc/highlight/patches/patch-makefile index 73bc7b8e0d2..9be026f9a1e 100644 --- a/textproc/highlight/patches/patch-makefile +++ b/textproc/highlight/patches/patch-makefile @@ -1,4 +1,4 @@ -$NetBSD: patch-makefile,v 1.1 2014/08/18 01:24:59 schmonz Exp $ +$NetBSD: patch-makefile,v 1.2 2018/04/08 19:40:29 schmonz Exp $ Use pkgsrc-provided paths and tools. @@ -47,24 +47,50 @@ Use pkgsrc-provided paths and tools. all cli: ${MAKE} -C ./src -f ./makefile HL_DATA_DIR=${data_dir} HL_CONFIG_DIR=${conf_dir} -@@ -75,14 +76,14 @@ install: +@@ -75,14 +76,11 @@ install: ${DESTDIR}${data_dir}themes \ ${DESTDIR}${data_dir}langDefs \ ${DESTDIR}${data_dir}plugins - ${MKDIR} ${DESTDIR}${man_dir} -+ ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${man_dir} - ${MKDIR} ${DESTDIR}${bin_dir} +- ${MKDIR} ${DESTDIR}${bin_dir} ${INSTALL_DATA} ./langDefs/*.lang ${DESTDIR}${data_dir}langDefs/ ${INSTALL_DATA} ./*.conf ${DESTDIR}${conf_dir} ${INSTALL_DATA} ./themes/*.theme ${DESTDIR}${data_dir}themes/ ${INSTALL_DATA} ./plugins/*.lua ${DESTDIR}${data_dir}plugins/ - ${INSTALL_DATA} ./man/highlight.1.gz ${DESTDIR}${man_dir} -+ ${BSD_INSTALL_MAN} ./man/highlight.1.gz ${DESTDIR}${man_dir} ${INSTALL_DATA} ./AUTHORS ${DESTDIR}${doc_dir} ${INSTALL_DATA} ./README ${DESTDIR}${doc_dir} ${INSTALL_DATA} ./README_DE ${DESTDIR}${doc_dir} -@@ -129,7 +130,7 @@ uninstall: +@@ -99,15 +97,25 @@ install: + ${INSTALL_DATA} ./examples/swig/README_SWIG ${DESTDIR}${doc_dir} + ${INSTALL_DATA} ./examples/highlight_pipe.* ${DESTDIR}${examples_dir} + ${INSTALL_DATA} ./examples/*.py ${DESTDIR}${examples_dir} +- ${INSTALL_PROGRAM} ./src/highlight ${DESTDIR}${bin_dir} + + @echo + @echo "Done." +- @echo "Type highlight --help or man highlight for instructions." + @echo "Take a look at ${DESTDIR}${examples_dir} for plugins and SWIG language bindings." ++ @echo "Execute 'make install-cli' to install the highlight CLI ('make cli')." + @echo "Execute 'make install-gui' to install the highlight GUI ('make gui')." + @echo "Do not hesitate to report problems. Unknown bugs are hard to fix." + ++install-cli: ++ @echo "Installing files for the CLI..." ++ ${MKDIR} ${DESTDIR}${bin_dir} ++ ${INSTALL_PROGRAM} ./src/highlight ${DESTDIR}${bin_dir} ++ ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${man_dir} ++ ${BSD_INSTALL_MAN} ./man/highlight.1.gz ${DESTDIR}${man_dir} ++ ++ @echo ++ @echo "Done." ++ @echo "Type highlight --help or man highlight for instructions." ++ + install-gui: + @echo "Installing files for the GUI..." + ${MKDIR} ${DESTDIR}${data_dir} \ +@@ -129,7 +137,7 @@ uninstall: ${RMDIR} ${DESTDIR}${doc_dir} ${RMDIR} ${DESTDIR}${conf_dir} ${RMDIR} ${DESTDIR}${examples_dir} diff --git a/textproc/highlight/patches/patch-src_core_platform__fs.cpp b/textproc/highlight/patches/patch-src_core_platform__fs.cpp new file mode 100644 index 00000000000..bb490a5309b --- /dev/null +++ b/textproc/highlight/patches/patch-src_core_platform__fs.cpp @@ -0,0 +1,22 @@ +$NetBSD: patch-src_core_platform__fs.cpp,v 1.1 2018/04/08 19:40:29 schmonz Exp $ + +Fix build on (at least) SmartOS. + +--- src/core/platform_fs.cpp.orig 2013-09-24 20:24:04.000000000 +0000 ++++ src/core/platform_fs.cpp +@@ -71,13 +71,13 @@ namespace Platform + #include <pwd.h> + const char pathSeparator = '/'; + +- std::string getAppPath() ++ ::std::string getAppPath() + { + return ""; + } + + +- std::string getHomePath() ++ ::std::string getHomePath() + { + struct passwd *pw = getpwuid(getuid()); + return string(pw->pw_dir); diff --git a/textproc/highlight/patches/patch-src_makefile b/textproc/highlight/patches/patch-src_makefile index 1bed34b3627..512991b7740 100644 --- a/textproc/highlight/patches/patch-src_makefile +++ b/textproc/highlight/patches/patch-src_makefile @@ -1,10 +1,10 @@ -$NetBSD: patch-src_makefile,v 1.1 2014/08/18 01:24:59 schmonz Exp $ +$NetBSD: patch-src_makefile,v 1.2 2018/04/08 19:40:29 schmonz Exp $ Use pkgsrc-specified compiler and flags. --- src/makefile.orig 2014-04-04 17:26:25.000000000 +0000 +++ src/makefile -@@ -12,12 +12,12 @@ +@@ -12,18 +12,18 @@ # See src/gui-qt/highlight.pro for the Qt GUI compilation options @@ -19,7 +19,14 @@ Use pkgsrc-specified compiler and flags. #CFLAGS:=-ggdb ${CFLAGS} CFLAGS_DILU=-fno-strict-aliasing -@@ -61,7 +61,7 @@ ifdef PIC + + SO_VERSION=3.17 +- ++LSO_VERSION=$(shell echo ${SO_VERSION} | awk -F. '{ printf "%d:%d:0\n", $$1 - 1, $$2 }') + + # Source paths + CORE_DIR=./core/ +@@ -61,14 +61,16 @@ ifdef PIC CFLAGS+=-fPIC endif @@ -28,3 +35,49 @@ Use pkgsrc-specified compiler and flags. # Do not strip by default (Mac OS X lazy pointer issues) # Add -static to avoid linking with shared libs (can cause trouble when highlight # is run as service) + #LDFLAGS = ${LDFLAGS} -s + #LDFLAGS= -Wl,--as-needed + +-CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS} ++LIBTOOL=libtool --tag=CXX ++ ++CXX_COMPILE=${LIBTOOL} --mode=compile ${CXX} ${CFLAGS} ${CXX_DIR} -I ${INCLUDE_DIR} ${LUA_CFLAGS} -c + + # Data directories (data dir, configuration file dir) + CXX_DIR=-DHL_DATA_DIR=\"${HL_DATA_DIR}\" -DHL_CONFIG_DIR=\"${HL_CONFIG_DIR}\" +@@ -96,14 +98,14 @@ GUI_OBJECTS:=${GUI_QT_DIR}main.cpp ${GUI + ${GUI_QT_DIR}showtextfile.cpp + + +-cli: libhighlight.a ${CLI_OBJECTS} +- ${CXX} ${LDFLAGS} -o highlight ${CLI_OBJECTS} -L. -lhighlight ${LUA_LIBS} ++cli: ${CLI_OBJECTS} ++ ${CXX} ${LDFLAGS} -o highlight ${CLI_OBJECTS} -lhighlight ${LUA_LIBS} + + lib-static libhighlight.a: ${CORE_OBJECTS} + ${AR} ${ARFLAGS} libhighlight.a ${CORE_OBJECTS} ${DILU_OBJECTS} + + lib-shared libhighlight.so.1.0: ${CORE_OBJECTS} +- ld -shared -soname libhighlight.so.1 -o libhighlight.so.${SO_VERSION} -lc ${CORE_OBJECTS} ++ ${LIBTOOL} --mode=link ${CXX} ${LDFLAGS} -o libhighlight.la ${CORE_OBJECTS:%.o=%.lo} ${DILU_OBJECTS:%.o=%.lo} -version-info ${LSO_VERSION} -rpath ${PREFIX}/lib + + gui-qt: highlight-gui + +@@ -116,7 +118,7 @@ $(OBJECTFILES) : makefile + + + datadir.o: ${CORE_DIR}datadir.cpp ${INCLUDE_DIR}datadir.h ${INCLUDE_DIR}platform_fs.h +- ${CXX_COMPILE} ${CORE_DIR}datadir.cpp ${CXX_DIR} ++ ${CXX_COMPILE} ${CORE_DIR}datadir.cpp + + platform_fs.o: ${CORE_DIR}platform_fs.cpp ${INCLUDE_DIR}platform_fs.h + ${CXX_COMPILE} ${CORE_DIR}platform_fs.cpp +@@ -197,7 +199,7 @@ main.o: ${CLI_DIR}main.cpp ${CLI_DIR}mai + ${INCLUDE_DIR}syntaxreader.h ${INCLUDE_DIR}themereader.h ${INCLUDE_DIR}elementstyle.h \ + ${INCLUDE_DIR}stylecolour.h ${INCLUDE_DIR}preformatter.h \ + ${CLI_DIR}help.h ${INCLUDE_DIR}version.h +- ${CXX_COMPILE} ${CLI_DIR}main.cpp ${CXX_DIR} ++ ${CXX_COMPILE} ${CLI_DIR}main.cpp + + + #3rd party libs |