diff options
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/Makefile | 92 | ||||
-rw-r--r-- | freebsd/distinfo | 3 | ||||
-rw-r--r-- | freebsd/files/pkg-message.in | 9 | ||||
-rw-r--r-- | freebsd/pkg-descr | 5 | ||||
-rw-r--r-- | freebsd/pkg-plist | 110 | ||||
-rwxr-xr-x | freebsd/scripts/xvfb-run.sh | 118 |
6 files changed, 337 insertions, 0 deletions
diff --git a/freebsd/Makefile b/freebsd/Makefile new file mode 100644 index 0000000..72e4480 --- /dev/null +++ b/freebsd/Makefile @@ -0,0 +1,92 @@ +PORTNAME= sciteco +DISTVERSION= 2.1.0 +CATEGORIES= editors textproc devel +MASTER_SITES= https://github.com/rhaberkorn/${PORTNAME}/releases/download/v${DISTVERSION}/ \ + SOURCEFORGE/${PORTNAME}/v${DISTVERSION}/ + +MAINTAINER= robin.haberkorn@googlemail.com +COMMENT= Scintilla-based Text Editor and Corrector +WWW= https://github.com/rhaberkorn/sciteco + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING + +FLAVORS= curses gtk +FLAVOR?= ${FLAVORS:[1]} +curses_PKGNAMESUFFIX=-curses +gtk_PKGNAMESUFFIX=-gtk + +# As SciTECO uses itself during the build process, +# it makes sense to compile it running under a dummy XServer. +# This is both faster and works in headless environments as well. +gtk_BUILD_DEPENDS=Xvfb:x11-servers/xorg-server@xvfb \ + xauth:x11/xauth mcookie:devel/util-linux + +USES= gmake pkgconfig compiler:c11 compiler:c++17-lang gnome groff +USE_GNOME= glib20 + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= +CONFIGURE_OUTSOURCE=yes + +MAKEFILE= GNUmakefile +TEST_TARGET= check + +# NOTE: Unlike on Debian, we cannot build a sciteco-common package. +# FreeBSD does not yet support subpackages. +# Therefore both flavors will install totally independant +# (partially redundant) files. +.if ${FLAVOR} == gtk +DATADIR= ${PREFIX}/share/gsciteco +.endif + +SUB_FILES= pkg-message + +.if ${FLAVOR} == curses +USES+= ncurses +CONFIGURE_ARGS+=--with-interface=ncurses +PLIST_SUB+= GTK="@comment " PROGRAM_PREFIX="" +.elif ${FLAVOR} == gtk +USES+= desktop-file-utils +# FIXME: To appease QA checks, we would have to +# USE_GNOME+=cairo gdkpixbuf2 and +# gtk_LIB_DEPENDS+=libharfbuzz.so:print/harfbuzz +USE_GNOME+= gtk30 +CONFIGURE_ARGS+=--with-interface=gtk --program-prefix=g \ + --with-scitecodatadir="${DATADIR}" +PLIST_SUB+= GTK="" PROGRAM_PREFIX=g +.endif + +OPTIONS_DEFINE= LEXILLA MALLOC_REPLACEMENT TECO_INTEGER_32 +OPTIONS_DEFAULT=LEXILLA +OPTIONS_SUB= yes + +LEXILLA_DESC=Build with Lexilla lexer support (larger) +MALLOC_REPLACEMENT_DESC=Force replacement of system malloc() +TECO_INTEGER_32_DESC=Use 32-bit TECO integers + +LEXILLA_CONFIGURE_OFF=--without-lexilla +MALLOC_REPLACEMENT_CONFIGURE_ON=--enable-malloc-replacement +TECO_INTEGER_32_CONFIGURE_ON=--with-teco-integer=32 + +.include <bsd.port.pre.mk> + +.if ${FLAVOR} == gtk +# Run under Xvfb (see above). +# This is done only now, since USES=gmake would overwrite MAKE_CMD. +MAKE_CMD="${SCRIPTDIR}/xvfb-run.sh" ${GMAKE} +.endif + +post-install: +.for SZ in 16 32 48 256 + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps + ${INSTALL_DATA} ${WRKSRC}/ico/sciteco-${SZ}.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps/sciteco.png +.endfor + # To appease `make check-plist`: + ${RM} ${STAGEDIR}${DATADIR}/*.png + ${MKDIR} ${STAGEDIR}${PREFIX}/share/applications + ${INSTALL_DATA} ${WRKSRC}/src/sciteco.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/sciteco.desktop + +.include <bsd.port.post.mk> diff --git a/freebsd/distinfo b/freebsd/distinfo new file mode 100644 index 0000000..d8aace8 --- /dev/null +++ b/freebsd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1729096188 +SHA256 (sciteco-2.1.0.tar.gz) = f03dfe6c0e0a19e3144b25e2f50883b9b958422af8249833cfc49f076f88e361 +SIZE (sciteco-2.1.0.tar.gz) = 3966407 diff --git a/freebsd/files/pkg-message.in b/freebsd/files/pkg-message.in new file mode 100644 index 0000000..b91ee06 --- /dev/null +++ b/freebsd/files/pkg-message.in @@ -0,0 +1,9 @@ +[ +{ type: install + message: <<XYZZY +You are recommended to copy %%DATADIR%%/sample.teco_ini to ~/.teco_ini +and edit this file afterwards with SciTECO. +XYZZY +} +] + diff --git a/freebsd/pkg-descr b/freebsd/pkg-descr new file mode 100644 index 0000000..530d978 --- /dev/null +++ b/freebsd/pkg-descr @@ -0,0 +1,5 @@ +SciTECO is an interactive TECO dialect, similar to Video TECO. +It also adds features from classic Standard TECO-11, +and incorporates many unique new ideas. +It is geared towards UNIX-like operating systems but also +natively supports Microsoft Windows NT. diff --git a/freebsd/pkg-plist b/freebsd/pkg-plist new file mode 100644 index 0000000..5539757 --- /dev/null +++ b/freebsd/pkg-plist @@ -0,0 +1,110 @@ +bin/%%PROGRAM_PREFIX%%grosciteco.tes +bin/%%PROGRAM_PREFIX%%sciteco +bin/%%PROGRAM_PREFIX%%tedoc.tes +share/man/man1/%%PROGRAM_PREFIX%%grosciteco.tes.1.gz +share/man/man1/%%PROGRAM_PREFIX%%sciteco.1.gz +share/man/man1/%%PROGRAM_PREFIX%%tedoc.tes.1.gz +share/man/man7/%%PROGRAM_PREFIX%%sciteco.7.gz +%%DATADIR%%/lib/color.tes +%%DATADIR%%/lib/colors/solarized.tes +%%DATADIR%%/lib/colors/terminal.tes +%%DATADIR%%/lib/fnkeys.tes +%%DATADIR%%/lib/getopt.tes +%%DATADIR%%/lib/lexer.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/abaqus.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/ada.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/asciidoc.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/asl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/asm.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/ave.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/avs.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/awk.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/baan.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/bash.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/batch.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/blitzbasic.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/c.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/caml.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/ch.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/cmake.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/cobol.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/cpp.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/cs.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/d.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/devicetree.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/diff.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/docbook.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/eiffel.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/f77.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/f95.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/flagship.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/flash.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/freebasic.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/gap.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/git.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/go.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/gob.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/html.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/idl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/inno.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/java.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/js.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/kix.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/lisp.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/lout.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/lua.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/make.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/mako.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/markdown.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/matlab.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/mmixal.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/octave.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/oscript.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/pascal.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/perl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/php.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/pike.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/pov.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/powerpro.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/purebasic.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/python.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/r.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/rc.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/rebol.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/rust.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/scheme.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/specman.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/spice.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/swift.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/systemverilog.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/tacl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/tal.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/tcl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/test.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/troff.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/vala.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/vb.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/verilog.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/vhdl.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/vxml.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/xml.tes +%%LEXILLA%%%%DATADIR%%/lib/lexers/yaml.tes +%%DATADIR%%/lib/lexers/woman.tes +%%DATADIR%%/lib/session.tes +%%DATADIR%%/lib/string.tes +%%DATADIR%%/lib/women/grosciteco.tes.1.woman +%%DATADIR%%/lib/women/grosciteco.tes.1.woman.tec +%%DATADIR%%/lib/women/sciteco.1.woman +%%DATADIR%%/lib/women/sciteco.1.woman.tec +%%DATADIR%%/lib/women/sciteco.7.woman +%%DATADIR%%/lib/women/sciteco.7.woman.tec +%%DATADIR%%/lib/women/tedoc.tes.1.woman +%%DATADIR%%/lib/women/tedoc.tes.1.woman.tec +%%DATADIR%%/sample.teco_ini +%%DATADIR%%/sciteco.tmac +%%GTK%%%%DATADIR%%/fallback.css +%%GTK%%share/icons/hicolor/16x16/apps/sciteco.png +%%GTK%%share/icons/hicolor/32x32/apps/sciteco.png +%%GTK%%share/icons/hicolor/48x48/apps/sciteco.png +%%GTK%%share/icons/hicolor/256x256/apps/sciteco.png +%%GTK%%share/applications/sciteco.desktop diff --git a/freebsd/scripts/xvfb-run.sh b/freebsd/scripts/xvfb-run.sh new file mode 100755 index 0000000..b4fd5a0 --- /dev/null +++ b/freebsd/scripts/xvfb-run.sh @@ -0,0 +1,118 @@ +#!/bin/sh +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../xorg-server/xvfb-run.sh +# Copyright (C) 2005 The T2 SDE Project +# Copyright (C) XXXX - 2005 Debian +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- T2-COPYRIGHT-NOTE-END --- + +# $Id: xvfb-run 2166 2005-01-27 07:54:19Z branden $ +# from: http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/local/xvfb-run + +# This script starts an instance of Xvfb, the "fake" X server, runs a command +# with that server available, and kills the X server when done. The return +# value of the command becomes the return value of this script. +# +# If anyone is using this to build a Debian package, make sure the package +# Build-Depends on xvfb, xbase-clients, and xfonts-base. +# +# This script has been modified by Robin Haberkorn to remove dependencies on +# GNU `fmt` and `getopt` for BSD compatibility. + +set -e + +PROGNAME=xvfb-run +SERVERNUM=99 +AUTHFILE= +ERRORFILE=/dev/null +STARTWAIT=3 +XVFBARGS="-screen 0 640x480x8" +LISTENTCP="-nolisten tcp" +XAUTHPROTO=. + +# Display a message, wrapping lines at the terminal width. +message () { + echo "$PROGNAME: $*" | fmt +} + +# Display an error message. +error () { + message "error: $*" >&2 +} + +# Find a free server number by looking at .X*-lock files in /tmp. +find_free_servernum() { + # Sadly, the "local" keyword is not POSIX. Leave the next line commented in + # the hope Debian Policy eventually changes to allow it in /bin/sh scripts + # anyway. + #local i + + i=$SERVERNUM + while [ -f /tmp/.X$i-lock ]; do + i=$(($i + 1)) + done + echo $i +} + +SERVERNUM=$(find_free_servernum) + +if [ -z "$*" ]; then + error "need a command to run" + exit 2 +fi + +if ! which xauth >/dev/null; then + error "xauth command not found" + exit 3 +fi + +# If the user did not specify an X authorization file to use, set up a temporary +# directory to house one. +if [ -z "$AUTHFILE" ]; then + XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$" + if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then + error "temporary directory $XVFB_RUN_TMPDIR already exists" + exit 4 + fi + AUTHFILE=$(mktemp -p "$XVFB_RUN_TMPDIR" Xauthority) +fi + +# Start Xvfb. +MCOOKIE=$(mcookie) +XAUTHORITY=$AUTHFILE xauth add ":$SERVERNUM" "$XAUTHPROTO" "$MCOOKIE" \ + >"$ERRORFILE" 2>&1 +XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >"$ERRORFILE" \ + 2>&1 & +XVFBPID=$! +sleep "$STARTWAIT" + +# Start the command and save its exit status. +set +e +DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1 +RETVAL=$? +set -e + +# Kill Xvfb now that the command has exited. +kill $XVFBPID + +# Clean up. +XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1 +if [ -n "$XVFB_RUN_TMPDIR" ]; then + if ! rm -r "$XVFB_RUN_TMPDIR"; then + error "problem while cleaning up temporary directory" + exit 5 + fi +fi + +# Return the executed command's exit status. +exit $RETVAL + +# vim:set ai et sts=4 sw=4 tw=80: |