File:  [NetBSD Developer Wiki] / wikisrc / users / schmonz / Attic / randompatch.diff
Revision 1.1: download - view: text, annotated - select for diffs
Mon Aug 18 03:51:09 2014 UTC (8 years, 1 month ago) by schmonz
Branches: MAIN
CVS tags: HEAD
will this standalone file get syntax-highlighted?

    1: $NetBSD: randompatch.diff,v 1.1 2014/08/18 03:51:09 schmonz Exp $
    2: 
    3: Use pkgsrc-provided paths and tools.
    4: 
    5: --- makefile.orig	2013-06-27 20:36:48.000000000 +0000
    6: +++ makefile
    7: @@ -7,7 +7,7 @@
    8:  DESTDIR =
    9:  
   10:  # Root directory for final installation
   11: -PREFIX = /usr
   12: +#PREFIX = /usr
   13:  
   14:  # Location of the highlight data files:
   15:  data_dir = ${PREFIX}/share/highlight/
   16: @@ -16,7 +16,7 @@ data_dir = ${PREFIX}/share/highlight/
   17:  bin_dir = ${PREFIX}/bin/
   18:  
   19:  # Location of the highlight man page:
   20: -man_dir = ${PREFIX}/share/man/man1/
   21: +man_dir = ${PREFIX}/${PKGMANDIR}/man1/
   22:  
   23:  # Location of the highlight documentation:
   24:  doc_dir = ${PREFIX}/share/doc/highlight/
   25: @@ -25,7 +25,8 @@ doc_dir = ${PREFIX}/share/doc/highlight/
   26:  examples_dir = ${doc_dir}examples/
   27:  
   28:  # Location of the highlight config files:
   29: -conf_dir = /etc/highlight/
   30: +#conf_dir = /etc/highlight/
   31: +conf_dir = ${PREFIX}/share/examples/highlight/
   32:  #conf_dir = ${PREFIX}/etc/highlight/
   33:  
   34:  # Location of additional gui files
   35: @@ -33,10 +34,11 @@ desktop_apps = ${PREFIX}/share/applicati
   36:  desktop_pixmaps = ${PREFIX}/share/pixmaps/
   37:  
   38:  # Commands:
   39: -INSTALL_DATA=install -m644
   40: -INSTALL_PROGRAM=install -m755
   41: -MKDIR=mkdir -p -m 755
   42: -RMDIR=rm -r -f
   43: +INSTALL_DATA=${BSD_INSTALL_DATA}
   44: +INSTALL_LIB=${BSD_INSTALL_LIB}
   45: +INSTALL_PROGRAM=${BSD_INSTALL_PROGRAM}
   46: +MKDIR=${BSD_INSTALL_DATA_DIR}
   47: +RMDIR=${RM} -r -f
   48:  
   49:  all cli:
   50:  	${MAKE} -C ./src -f ./makefile HL_DATA_DIR=${data_dir} HL_CONFIG_DIR=${conf_dir}
   51: @@ -47,6 +49,9 @@ lib lib-static:
   52:  lib-shared:
   53:  	${MAKE} -C ./src -f ./makefile HL_DATA_DIR=${data_dir} HL_CONFIG_DIR=${conf_dir} PIC=1 lib-shared
   54:  
   55: +lib-libtool:
   56: +	${MAKE} -C ./src -f ./makefile HL_DATA_DIR=${data_dir} HL_CONFIG_DIR=${conf_dir} lib-libtool
   57: +
   58:  gui:
   59:  	${MAKE} -C ./src -f ./makefile HL_DATA_DIR=\"${data_dir}\" HL_CONFIG_DIR=\"${conf_dir}\" HL_DOC_DIR=\"${doc_dir}\" gui-qt
   60:  	@echo
   61: @@ -75,14 +80,14 @@ install:
   62:  		${DESTDIR}${data_dir}themes \
   63:  		${DESTDIR}${data_dir}langDefs \
   64:  		${DESTDIR}${data_dir}plugins
   65: -	${MKDIR} ${DESTDIR}${man_dir}
   66: +	${BSD_INSTALL_MAN_DIR} ${DESTDIR}${man_dir}
   67:  	${MKDIR} ${DESTDIR}${bin_dir}
   68:  
   69:  	${INSTALL_DATA} ./langDefs/*.lang ${DESTDIR}${data_dir}langDefs/
   70:  	${INSTALL_DATA} ./*.conf ${DESTDIR}${conf_dir}
   71:  	${INSTALL_DATA} ./themes/*.theme ${DESTDIR}${data_dir}themes/
   72:  	${INSTALL_DATA} ./plugins/*.lua ${DESTDIR}${data_dir}plugins/
   73: -	${INSTALL_DATA} ./man/highlight.1.gz ${DESTDIR}${man_dir}
   74: +	${BSD_INSTALL_MAN} ./man/highlight.1.gz ${DESTDIR}${man_dir}
   75:  	${INSTALL_DATA} ./AUTHORS ${DESTDIR}${doc_dir}
   76:  	${INSTALL_DATA} ./README ${DESTDIR}${doc_dir}
   77:  	${INSTALL_DATA} ./README_DE ${DESTDIR}${doc_dir}
   78: @@ -108,6 +113,10 @@ install:
   79:  	@echo "Execute 'make install-gui' to install the highlight GUI ('make gui')."
   80:  	@echo "Do not hesitate to report problems. Unknown bugs are hard to fix."
   81:  
   82: +install-libtool:
   83: +	${MKDIR} ${DESTDIR}${PREFIX}/lib
   84: +	libtool --mode=install ${INSTALL_LIB} -c ./src/libhighlight.la ${DESTDIR}${PREFIX}/lib/libhighlight.la
   85: +
   86:  install-gui:
   87:  	@echo "Installing files for the GUI..."
   88:  	${MKDIR} ${DESTDIR}${data_dir} \
   89: @@ -129,7 +138,7 @@ uninstall:
   90:  	${RMDIR} ${DESTDIR}${doc_dir}
   91:  	${RMDIR} ${DESTDIR}${conf_dir}
   92:  	${RMDIR} ${DESTDIR}${examples_dir}
   93: -	rm -rf ${DESTDIR}${man_dir}highlight.1.gz
   94: +	rm -rf ${DESTDIR}${man_dir}highlight.1*
   95:  	rm -rf ${DESTDIR}${bin_dir}highlight
   96:  	rm -rf ${DESTDIR}${bin_dir}highlight-gui
   97:  	rm -rf ${DESTDIR}${desktop_apps}highlight.desktop
   98: $NetBSD: randompatch.diff,v 1.1 2014/08/18 03:51:09 schmonz Exp $
   99: 
  100: Use pkgsrc-specified compiler and flags.
  101: 
  102: --- src/makefile.orig	2014-04-04 17:26:25.000000000 +0000
  103: +++ src/makefile
  104: @@ -12,12 +12,12 @@
  105:  
  106:  # See src/gui-qt/highlight.pro for the Qt GUI compilation options
  107:  
  108: -CXX=c++
  109: +#CXX=c++
  110:  
  111:  # Added -qt4 because of Arch Linux Qt5 migration
  112:  QMAKE=qmake-qt4
  113:  
  114: -CFLAGS:=-Wall -O2 ${CFLAGS} -DNDEBUG
  115: +#CFLAGS:=-Wall -O2 ${CFLAGS} -DNDEBUG
  116:  #CFLAGS:=-ggdb ${CFLAGS}
  117:  
  118:  CFLAGS_DILU=-fno-strict-aliasing
  119: @@ -61,14 +61,15 @@ ifdef PIC
  120:  	CFLAGS+=-fPIC
  121:  endif
  122:  
  123: -LDFLAGS = -ldl
  124: +#LDFLAGS = -ldl
  125:  # Do not strip by default (Mac OS X lazy pointer issues)
  126:  # Add -static to avoid linking with shared libs (can cause trouble when highlight
  127:  # is run as service)
  128:  #LDFLAGS = ${LDFLAGS} -s
  129:  #LDFLAGS= -Wl,--as-needed
  130:  
  131: -CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS}
  132: +#CXX_COMPILE=${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS}
  133: +CXX_COMPILE=libtool --mode=compile ${CXX} ${CFLAGS} -c -I ${INCLUDE_DIR} ${LUA_CFLAGS}
  134:  
  135:  # Data directories (data dir, configuration file dir)
  136:  CXX_DIR=-DHL_DATA_DIR=\"${HL_DATA_DIR}\" -DHL_CONFIG_DIR=\"${HL_CONFIG_DIR}\"
  137: @@ -84,6 +85,9 @@ CORE_OBJECTS:=stylecolour.o stringtools.
  138:  	syntaxreader.o elementstyle.o themereader.o \
  139:  	datadir.o preformatter.o platform_fs.o\
  140:  	ASStreamIterator.o ASResource.o ASFormatter.o ASBeautifier.o ASEnhancer.o
  141: +CORE_OBJECTS_LIBTOOL:=$(CORE_OBJECTS:.o=.lo)
  142: +.o.lo:
  143: +	mv $< $@
  144:  
  145:  DILU_OBJECTS:=InternalUtils.o  LuaExceptions.o  LuaFunction.o  LuaState.o\
  146:  	LuaUserData.o  LuaUtils.o  LuaValue.o  LuaVariable.o  LuaWrappers.o
  147: @@ -99,6 +103,9 @@ GUI_OBJECTS:=${GUI_QT_DIR}main.cpp ${GUI
  148:  cli: libhighlight.a ${CLI_OBJECTS}
  149:  	${CXX} ${LDFLAGS} -o highlight ${CLI_OBJECTS} -L. -lhighlight ${LUA_LIBS}
  150:  
  151: +lib-libtool libhighlight.la: ${CORE_OBJECTS} ${CORE_OBJECTS_LIBTOOL}
  152: +	libtool --mode=link ${CXX} ${LDFLAGS} -o libhighlight.la ${CORE_OBJECTS_LIBTOOL} -version-info 1:0:0 -rpath ${PREFIX}/lib
  153: +
  154:  lib-static libhighlight.a: ${CORE_OBJECTS}
  155:  	${AR} ${ARFLAGS} libhighlight.a ${CORE_OBJECTS} ${DILU_OBJECTS}
  156:  
  157: @@ -116,7 +123,7 @@ $(OBJECTFILES) : makefile
  158:  
  159:  
  160:  datadir.o: ${CORE_DIR}datadir.cpp ${INCLUDE_DIR}datadir.h ${INCLUDE_DIR}platform_fs.h
  161: -	${CXX_COMPILE} ${CORE_DIR}datadir.cpp ${CXX_DIR}
  162: +	${CXX_COMPILE} ${CXX_DIR} ${CORE_DIR}datadir.cpp
  163:  
  164:  platform_fs.o: ${CORE_DIR}platform_fs.cpp ${INCLUDE_DIR}platform_fs.h
  165:  	${CXX_COMPILE} ${CORE_DIR}platform_fs.cpp
  166: @@ -197,7 +204,7 @@ main.o: ${CLI_DIR}main.cpp ${CLI_DIR}mai
  167:    ${INCLUDE_DIR}syntaxreader.h ${INCLUDE_DIR}themereader.h ${INCLUDE_DIR}elementstyle.h \
  168:    ${INCLUDE_DIR}stylecolour.h  ${INCLUDE_DIR}preformatter.h \
  169:    ${CLI_DIR}help.h ${INCLUDE_DIR}version.h
  170: -	${CXX_COMPILE} ${CLI_DIR}main.cpp ${CXX_DIR}
  171: +	${CXX_COMPILE} ${CXX_DIR} ${CLI_DIR}main.cpp
  172:  
  173:  
  174:  #3rd party libs

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb