ports/132947: [new ports]: GeSHi core and Drupal highlighter module

Eygene Ryabinkin rea-fbsd at codelabs.ru
Sun Mar 22 21:00:14 UTC 2009


>Number:         132947
>Category:       ports
>Synopsis:       [new ports]: GeSHi core and Drupal highlighter module
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 22 21:00:13 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.2-PRERELEASE amd64
>Organization:
Code Labs
>Environment:

System: FreeBSD 7.2-PRERELEASE amd64

>Description:

I had ported Drupal 6.x module for code syntax highlighting.  This
submission contains both Drupal module and the corresponding PHP
library to do the actual highlighting work.

>How-To-Repeat:

http://qbnz.com/highlighter/
http://drupal.org/project/geshifilter

>Fix:

Shell archive for the GeSHi core:
--- geshi.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	php5-geshi
#	php5-geshi/Makefile
#	php5-geshi/distinfo
#	php5-geshi/pkg-descr
#
echo c - php5-geshi
mkdir -p php5-geshi > /dev/null 2>&1
echo x - php5-geshi/Makefile
sed 's/^X//' >php5-geshi/Makefile << '1ee784fae31bd111b6d444ca0d185d78'
X# New ports collection makefile for:	php5-geshi
X# Date created:				2009-03-18
X# Whom:					Eygene Ryabinkin <rea-fbsd at codelabs.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	geshi
XPORTVERSION=	1.0.8.2
XCATEGORIES=	devel
XMASTER_SITES=	SF
XPKGNAMEPREFIX=	php5-
XDISTNAME=	GeSHi-${PORTVERSION}
X
XMAINTAINER=	rea-fbsd at codelabs.ru
XCOMMENT=	Native PHP syntax highlighting engine
X
XWRKSRC=		${WRKDIR}/geshi
XPLIST=		${WRKDIR}/PLIST
X
XUSE_BZIP2=	yes
XUSE_PHP=	yes
XDEFAULT_PHP_VER=	5
XIGNORE_WITH_PHP=	4
XNO_BUILD=	yes
X
XPHP_DESTDIR=	lib/php/geshi
XDIRS=		\
X		geshi
XFILES=		\
X		geshi.php \
X		geshi/abap.php \
X		geshi/actionscript.php \
X		geshi/actionscript3.php \
X		geshi/ada.php \
X		geshi/apache.php \
X		geshi/applescript.php \
X		geshi/apt_sources.php \
X		geshi/asm.php \
X		geshi/asp.php \
X		geshi/autoit.php \
X		geshi/avisynth.php \
X		geshi/bash.php \
X		geshi/basic4gl.php \
X		geshi/bf.php \
X		geshi/blitzbasic.php \
X		geshi/bnf.php \
X		geshi/boo.php \
X		geshi/c.php \
X		geshi/caddcl.php \
X		geshi/cadlisp.php \
X		geshi/cfdg.php \
X		geshi/cfm.php \
X		geshi/cil.php \
X		geshi/cobol.php \
X		geshi/cpp-qt.php \
X		geshi/cpp.php \
X		geshi/csharp.php \
X		geshi/css.php \
X		geshi/c_mac.php \
X		geshi/d.php \
X		geshi/delphi.php \
X		geshi/diff.php \
X		geshi/div.php \
X		geshi/dos.php \
X		geshi/dot.php \
X		geshi/eiffel.php \
X		geshi/email.php \
X		geshi/fortran.php \
X		geshi/freebasic.php \
X		geshi/genero.php \
X		geshi/gettext.php \
X		geshi/glsl.php \
X		geshi/gml.php \
X		geshi/gnuplot.php \
X		geshi/groovy.php \
X		geshi/haskell.php \
X		geshi/hq9plus.php \
X		geshi/html4strict.php \
X		geshi/idl.php \
X		geshi/ini.php \
X		geshi/inno.php \
X		geshi/intercal.php \
X		geshi/io.php \
X		geshi/java.php \
X		geshi/java5.php \
X		geshi/javascript.php \
X		geshi/kixtart.php \
X		geshi/klonec.php \
X		geshi/klonecpp.php \
X		geshi/latex.php \
X		geshi/lisp.php \
X		geshi/lolcode.php \
X		geshi/lotusformulas.php \
X		geshi/lotusscript.php \
X		geshi/lscript.php \
X		geshi/lua.php \
X		geshi/m68k.php \
X		geshi/make.php \
X		geshi/matlab.php \
X		geshi/mirc.php \
X		geshi/mpasm.php \
X		geshi/mxml.php \
X		geshi/mysql.php \
X		geshi/nsis.php \
X		geshi/objc.php \
X		geshi/per.php \
X		geshi/ocaml-brief.php \
X		geshi/ocaml.php \
X		geshi/oobas.php \
X		geshi/oracle11.php \
X		geshi/oracle8.php \
X		geshi/pascal.php \
X		geshi/perl.php \
X		geshi/php-brief.php \
X		geshi/php.php \
X		geshi/pic16.php \
X		geshi/pixelbender.php \
X		geshi/plsql.php \
X		geshi/povray.php \
X		geshi/powershell.php \
X		geshi/robots.php \
X		geshi/ruby.php \
X		geshi/sas.php \
X		geshi/sql.php \
X		geshi/scala.php \
X		geshi/scheme.php \
X		geshi/scilab.php \
X		geshi/sdlbasic.php \
X		geshi/smalltalk.php \
X		geshi/smarty.php \
X		geshi/tcl.php \
X		geshi/teraterm.php \
X		geshi/text.php \
X		geshi/thinbasic.php \
X		geshi/tsql.php \
X		geshi/typoscript.php \
X		geshi/vb.php \
X		geshi/vbnet.php \
X		geshi/verilog.php \
X		geshi/vhdl.php \
X		geshi/vim.php \
X		geshi/visualfoxpro.php \
X		geshi/visualprolog.php \
X		geshi/whitespace.php \
X		geshi/winbatch.php \
X		geshi/xml.php \
X		geshi/xorg_conf.php \
X		geshi/xpp.php \
X		geshi/z80.php
X
XDOCDIRS=	\
X		api/geshi/core/ \
X		api/geshi/ \
X		api/media/images/ \
X		api/media/ \
X		api/__filesource/ \
X		api/
X
XDOCFILES=	\
X		api/blank.html \
X		api/classtrees_geshi.html \
X		api/elementindex.html \
X		api/elementindex_geshi.html \
X		api/errors.html \
X		api/geshi/core/GeSHi.html \
X		api/geshi/core/_geshi.php.html \
X		api/index.html \
X		api/li_geshi.html \
X		api/media/banner.css \
X		api/media/images/AbstractClass.png \
X		api/media/images/AbstractClass_logo.png \
X		api/media/images/AbstractMethod.png \
X		api/media/images/AbstractPrivateClass.png \
X		api/media/images/AbstractPrivateClass_logo.png \
X		api/media/images/AbstractPrivateMethod.png \
X		api/media/images/blank.png \
X		api/media/images/Class.png \
X		api/media/images/class_folder.png \
X		api/media/images/Class_logo.png \
X		api/media/images/Constant.png \
X		api/media/images/Constructor.png \
X		api/media/images/Destructor.png \
X		api/media/images/empty.png \
X		api/media/images/file.png \
X		api/media/images/folder.png \
X		api/media/images/Function.png \
X		api/media/images/function_folder.png \
X		api/media/images/Global.png \
X		api/media/images/I.png \
X		api/media/images/Index.png \
X		api/media/images/Interface.png \
X		api/media/images/Interface_logo.png \
X		api/media/images/L.png \
X		api/media/images/Lminus.png \
X		api/media/images/Lplus.png \
X		api/media/images/Method.png \
X		api/media/images/next_button.png \
X		api/media/images/next_button_disabled.png \
X		api/media/images/package.png \
X		api/media/images/package_folder.png \
X		api/media/images/Page.png \
X		api/media/images/Page_logo.png \
X		api/media/images/previous_button.png \
X		api/media/images/previous_button_disabled.png \
X		api/media/images/PrivateClass.png \
X		api/media/images/PrivateClass_logo.png \
X		api/media/images/PrivateMethod.png \
X		api/media/images/T.png \
X		api/media/images/PrivateVariable.png \
X		api/media/images/private_class_logo.png \
X		api/media/images/StaticMethod.png \
X		api/media/images/StaticVariable.png \
X		api/media/images/Tminus.png \
X		api/media/images/Tplus.png \
X		api/media/images/tutorial.png \
X		api/media/images/tutorial_folder.png \
X		api/media/images/up_button.png \
X		api/media/images/Variable.png \
X		api/media/stylesheet.css \
X		api/packages.html \
X		api/todolist.html \
X		api/__filesource/fsource_geshi_core_geshi.php.html \
X		BUGS \
X		CHANGES \
X		COPYING \
X		geshi-doc.html \
X		geshi-doc.txt \
X		phpdoc.ini \
X		README \
X		THANKS \
X		TODO
X
XEXAMPLESFILES=	\
X		aliased.php \
X		cssgen.php \
X		cssgen2.php \
X		example.php \
X		langcheck.php
X
Xpost-extract:
X# Generate packing list
X.for f in ${FILES}
X	@${ECHO} '${PHP_DESTDIR}/${f}' >> "${PLIST}"
X.endfor
X.for d in ${DIRS}
X	@${ECHO} '@dirrm ${PHP_DESTDIR}/${d}' >> "${PLIST}"
X.endfor
X	@${ECHO} '@dirrm ${PHP_DESTDIR}' >> "${PLIST}"
X.if !defined(NOPORTDOCS)
X.for f in ${DOCFILES}
X	@${ECHO} '${DOCSDIR_REL}/${f}' >> "${PLIST}"
X.endfor
X.for d in ${DOCDIRS}
X	@${ECHO} '@dirrm ${DOCSDIR_REL}/${d}' >> "${PLIST}"
X.endfor
X	@${ECHO} '@dirrm ${DOCSDIR_REL}' >> "${PLIST}"
X.endif # !defined(NOPORTDOCS)
X.if !defined(NOPORTEXAMPLES)
X.for f in ${EXAMPLESFILES}
X	@${ECHO} '${EXAMPLESDIR_REL}/${f}' >> "${PLIST}"
X.endfor
X.for d in ${EXAMPLESDIRS}
X	@${ECHO} '@dirrm ${EXAMPLESDIR_REL}/${d}' >> "${PLIST}"
X.endfor
X	@${ECHO} '@dirrm ${EXAMPLESDIR_REL}' >> "${PLIST}"
X.endif # !defined(NOPORTEXAMPLES)
X
Xdo-install:
X.for d in ${DIRS}
X	${MKDIR} ${PREFIX}/${PHP_DESTDIR}/${d}
X.endfor
X.for f in ${FILES}
X	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/${PHP_DESTDIR}/${f:H}
X.endfor
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for d in ${DOCDIRS}
X	${MKDIR} ${DOCSDIR}/${d}
X.endfor
X.for f in ${DOCFILES}
X	${INSTALL_DATA} ${WRKSRC}/docs/${f} ${DOCSDIR}/${f:H}
X.endfor
X.endif # !defined(NOPORTDOCS)
X.if !defined(NOPORTEXAMPLES)
X	${MKDIR} ${EXAMPLESDIR}
X.for d in ${EXAMPLESDIRS}
X	${MKDIR} ${EXAMPLESDIR}/${d}
X.endfor
X.for f in ${EXAMPLESFILES}
X	${INSTALL_DATA} ${WRKSRC}/contrib/${f} ${EXAMPLESDIR}/${f:H}
X.endfor
X.endif # !defined(NOPORTEXAMPLES)
X
X.include <bsd.port.mk>
1ee784fae31bd111b6d444ca0d185d78
echo x - php5-geshi/distinfo
sed 's/^X//' >php5-geshi/distinfo << 'e8d7e161dcf2e48b3e7e9d28d7bcb05d'
XMD5 (GeSHi-1.0.8.2.tar.bz2) = c5c6ece312ccf4453028638a648f9691
XSHA256 (GeSHi-1.0.8.2.tar.bz2) = 165c57d24123855bb8e6e652f7165b70166fa98095748a0ebe446fc4952a9a9a
XSIZE (GeSHi-1.0.8.2.tar.bz2) = 499355
e8d7e161dcf2e48b3e7e9d28d7bcb05d
echo x - php5-geshi/pkg-descr
sed 's/^X//' >php5-geshi/pkg-descr << '7403f44573a722fe14ce754acc825708'
XGeSHi started as an idea to create a generic syntax highlighter
Xfor the phpBB forum system, but has been generalised to this project.
XGeSHi aims to be a simple but powerful highlighting class,
Xwith the following goals:
X
X * Support for a wide range of popular languages
X * Easy to add a new language for highlighting
X * Highly customisable output formats
X
XWWW: http://qbnz.com/highlighter/
7403f44573a722fe14ce754acc825708
exit
--- geshi.shar ends here ---

Shell archive for the Drupal module:
--- drupal6-geshifilter.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	drupal6-geshifilter
#	drupal6-geshifilter/Makefile
#	drupal6-geshifilter/distinfo
#	drupal6-geshifilter/pkg-descr
#	drupal6-geshifilter/files
#	drupal6-geshifilter/files/pkg-message.in
#	drupal6-geshifilter/files/patch-default-geshi-path
#
echo c - drupal6-geshifilter
mkdir -p drupal6-geshifilter > /dev/null 2>&1
echo x - drupal6-geshifilter/Makefile
sed 's/^X//' >drupal6-geshifilter/Makefile << '41249746808c7446f85aa8dc390425e6'
X# New ports collection makefile for:	drupal6-geshifilter
X# Date created:	                        Mar 20 2009
X# Whom:                                 Eygene Ryabinkin <rea-fbsd at codelabs.ru>
X#
X# $FreeBSD$
X
XPORTNAME=	geshifilter
XDISTVERSION=	6.x-1.2
XCATEGORIES=	www
XMASTER_SITES=	http://ftp.drupal.org/files/projects/
X
XMAINTAINER=	rea-fbsd at codelabs.ru
XCOMMENT=	Drupal 6 module for syntax highlighting
X
XRUN_DEPENDS=	${LOCALBASE}/lib/php/geshi/geshi.php:${PORTSDIR}/devel/php5-geshi
X
XPKGMESSAGE=	${WRKDIR}/pkg-message
XSUB_FILES=	pkg-message
X
XDRUPAL6_MODULE=	yes
XMODULE_DIRS=	geshi-extra tests translations
XMODULE_FILES=	geshi-extra/drupal5.php geshi-extra/drupal6.php \
X		geshifilter.admin.inc geshifilter.conflicts.inc \
X		geshifilter.css geshifilter.filtertips.inc \
X		geshifilter.inc geshifilter.info geshifilter.install \
X		geshifilter.module geshifilter.pages.inc \
X		geshinode.info geshinode.install geshinode.module \
X		tests/geshifilter.admin.test tests/geshifilter.pages.test \
X		translations/de.po translations/ja.po \
X		translations/geshifilter.pot translations/sk.po
X
XDOC_DIRS=	geshi-extra
XDOC_FILES=	LICENSE.txt README.txt geshi-extra/README
X
Xpost-patch:
X	@${REINPLACE_CMD} -e's|%%LOCALBASE%%|${LOCALBASE}|g' \
X	    ${WRKSRC}/geshifilter.inc
X
Xpost-install:
X	@${ECHO}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO}
X
X.include <bsd.port.pre.mk>
X.include "${.CURDIR}/../../www/drupal5/bsd.drupal.mk"
X.include <bsd.port.post.mk>
41249746808c7446f85aa8dc390425e6
echo x - drupal6-geshifilter/distinfo
sed 's/^X//' >drupal6-geshifilter/distinfo << 'f2497756066baacb7e7685759f8bbdff'
XMD5 (drupal/geshifilter-6.x-1.2.tar.gz) = 0424506496275a2fc2d5788cdee79507
XSHA256 (drupal/geshifilter-6.x-1.2.tar.gz) = f5c3e1ea78a4e458c10fbec49288e238a240a08a0592339557174d5f958b7a18
XSIZE (drupal/geshifilter-6.x-1.2.tar.gz) = 82024
f2497756066baacb7e7685759f8bbdff
echo x - drupal6-geshifilter/pkg-descr
sed 's/^X//' >drupal6-geshifilter/pkg-descr << 'f33bbd39cbb84f012858f638238851b0'
XThe GeShi Filter module provides a filter for source code syntax
Xhighlighting for a wide range of languages.
X
XWWW: http://drupal.org/project/geshifilter
f33bbd39cbb84f012858f638238851b0
echo c - drupal6-geshifilter/files
mkdir -p drupal6-geshifilter/files > /dev/null 2>&1
echo x - drupal6-geshifilter/files/pkg-message.in
sed 's/^X//' >drupal6-geshifilter/files/pkg-message.in << '6c1713c353495a8dffa5d4134399eebf'
XSuper-quick HOW-TO for GeSHi filter
X===================================
X
XTo use GeSHi highlighting features in the Drupal documents,
Xdo the following:
X
X 1. enable GeSHi modules inside Drupal;
X 2. configure GeSHi using "Site configuration" -> "GeSHi Filter"
X    link inside administrative menu; default GeSHi library path is
X      %%LOCALBASE%%/lib/php/geshi
X 3. enable GeSHi filtering for the input formats you choose to
X    handle syntax highlighting; menu "Site configuration" ->
X    "Input formats" will help you to do this;
X 4. write some content and test GeSHi functionality.
X
XTo create documents fully consisting of source code just create
Xnew content of type "Source code node".
X
XGood luck!
6c1713c353495a8dffa5d4134399eebf
echo x - drupal6-geshifilter/files/patch-default-geshi-path
sed 's/^X//' >drupal6-geshifilter/files/patch-default-geshi-path << '17ed75267ef0db777445ec47c212c696'
XThis patch sets the default location for the GeSHi library
Xto match FreeBSD's GeSHi port layout.
X
X--- geshifilter.inc.orig	2009-03-21 14:40:30.000000000 +0300
X+++ geshifilter.inc	2009-03-21 14:40:54.000000000 +0300
X@@ -7,7 +7,7 @@
X  */
X 
X function _geshifilter_get_geshi_dir() {
X-  return variable_get('geshifilter_geshi_dir', drupal_get_path('module', 'geshifilter') .'/geshi');
X+  return variable_get('geshifilter_geshi_dir', '%%LOCALBASE%%/lib/php/geshi');
X }
X 
X /**
17ed75267ef0db777445ec47c212c696
exit
--- drupal6-geshifilter.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list