From 93b17b334719ce6da23bf496209946e41ac55d1c Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 9 Dec 2024 23:09:11 +0300 Subject: updated FreeBSD package to v2.2.0 --- freebsd/Makefile | 64 ++++++++++++------------ freebsd/distinfo | 6 +-- freebsd/files/xvfb-run.sh | 118 ++++++++++++++++++++++++++++++++++++++++++++ freebsd/scripts/xvfb-run.sh | 118 -------------------------------------------- 4 files changed, 154 insertions(+), 152 deletions(-) create mode 100644 freebsd/files/xvfb-run.sh delete mode 100755 freebsd/scripts/xvfb-run.sh diff --git a/freebsd/Makefile b/freebsd/Makefile index 8de1173..abba4c5 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -1,5 +1,5 @@ PORTNAME= sciteco -DISTVERSION= 2.1.1 +DISTVERSION= 2.2.0 CATEGORIES= editors textproc devel MASTER_SITES= https://github.com/rhaberkorn/${PORTNAME}/releases/download/v${DISTVERSION}/ \ SOURCEFORGE/${PORTNAME}/v${DISTVERSION}/ @@ -11,23 +11,24 @@ WWW= https://rhaberkorn.github.io/sciteco/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -FLAVORS= curses gtk -FLAVOR?= ${FLAVORS:[1]} -curses_PKGNAMESUFFIX=-curses -gtk_PKGNAMESUFFIX=-gtk +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 +gtk_BUILD_DEPENDS= mcookie:devel/util-linux \ + xauth:x11/xauth \ + Xvfb:x11-servers/xorg-server@xvfb -USES= gmake pkgconfig compiler:c11 compiler:c++17-lang gnome groff +USES= compiler:c11 gmake gnome groff pkgconfig USE_GNOME= glib20 -GNU_CONFIGURE= yes +GNU_CONFIGURE= yes CONFIGURE_ARGS= -CONFIGURE_OUTSOURCE=yes +CONFIGURE_OUTSOURCE= yes MAKEFILE= GNUmakefile TEST_TARGET= check @@ -43,38 +44,39 @@ DATADIR= ${PREFIX}/share/gsciteco SUB_FILES= pkg-message .if ${FLAVOR} == curses -USES+= ncurses -CONFIGURE_ARGS+=--with-interface=ncurses -PLIST_SUB+= GTK="@comment " PROGRAM_PREFIX="" +USES+= ncurses +CONFIGURE_ARGS+= --with-interface=ncurses +PLIST_SUB+= GTK="@comment " \ + PROGRAM_PREFIX="" .elif ${FLAVOR} == gtk -USES+= desktop-file-utils +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 +USE_GNOME+= gtk30 +CONFIGURE_ARGS+= --program-prefix=g \ + --with-interface=gtk \ + --with-scitecodatadir="${DATADIR}" +PLIST_SUB+= GTK="" \ + PROGRAM_PREFIX=g .endif -OPTIONS_DEFINE= LEXILLA MALLOC_REPLACEMENT TECO_INTEGER_32 -OPTIONS_DEFAULT=LEXILLA -OPTIONS_SUB= yes +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_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 +LEXILLA_CONFIGURE_OFF= --without-lexilla +MALLOC_REPLACEMENT_CONFIGURE_ON= --enable-malloc-replacement +TECO_INTEGER_32_CONFIGURE_ON= --with-teco-integer=32 .include .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} +MAKE_CMD= ${SH} ${FILESDIR}/xvfb-run.sh ${GMAKE} .endif post-install: @@ -83,7 +85,7 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/ico/sciteco-${SZ}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${SZ}x${SZ}/apps/sciteco.png .endfor - # To appease `make check-plist`: +# To appease `make check-plist`: ${RM} ${STAGEDIR}${DATADIR}/*.png ${MKDIR} ${STAGEDIR}${PREFIX}/share/applications ${INSTALL_DATA} ${WRKSRC}/src/sciteco.desktop \ diff --git a/freebsd/distinfo b/freebsd/distinfo index 76b2d07..f0688b4 100644 --- a/freebsd/distinfo +++ b/freebsd/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1731881990 -SHA256 (sciteco-2.1.1.tar.gz) = 5f7f55b2d46f11f73cd122e821daccdfdba9f804473df6213e5f0982bf245c2e -SIZE (sciteco-2.1.1.tar.gz) = 3983183 +TIMESTAMP = 1733772734 +SHA256 (sciteco-2.2.0.tar.gz) = 57ad450623761b76ee8742686db9dd9aae9c1436944e982c36dd368dbbf82020 +SIZE (sciteco-2.2.0.tar.gz) = 3989774 diff --git a/freebsd/files/xvfb-run.sh b/freebsd/files/xvfb-run.sh new file mode 100644 index 0000000..b4fd5a0 --- /dev/null +++ b/freebsd/files/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: diff --git a/freebsd/scripts/xvfb-run.sh b/freebsd/scripts/xvfb-run.sh deleted file mode 100755 index b4fd5a0..0000000 --- a/freebsd/scripts/xvfb-run.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/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: -- cgit v1.2.3