From owner-svn-ports-all@freebsd.org Wed Feb 17 17:37:43 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE7FB54ADB4; Wed, 17 Feb 2021 17:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DglRC6PSXz3ty7; Wed, 17 Feb 2021 17:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE9E3ACC; Wed, 17 Feb 2021 17:37:43 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11HHbhj4061530; Wed, 17 Feb 2021 17:37:43 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11HHbhiJ061527; Wed, 17 Feb 2021 17:37:43 GMT (envelope-from mi@FreeBSD.org) Message-Id: <202102171737.11HHbhiJ061527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Wed, 17 Feb 2021 17:37:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r565528 - in head/lang/siod: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: in head/lang/siod: . files X-SVN-Commit-Revision: 565528 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 17:37:44 -0000 Author: mi Date: Wed Feb 17 17:37:42 2021 New Revision: 565528 URL: https://svnweb.freebsd.org/changeset/ports/565528 Log: Fix handling of %%SQL_ORACLE%% on non-i386 platforms -- settings OPTIONS_SUB is not enough for arch-specific options (seems like a bug). Add statfs functionality -- BSD has all the necessary APIs. Sponsored by: United Marsupials Added: head/lang/siod/files/patch-statfs (contents, props changed) Modified: head/lang/siod/Makefile head/lang/siod/pkg-plist Modified: head/lang/siod/Makefile ============================================================================== --- head/lang/siod/Makefile Wed Feb 17 17:36:56 2021 (r565527) +++ head/lang/siod/Makefile Wed Feb 17 17:37:42 2021 (r565528) @@ -18,12 +18,14 @@ USES= uidfix tar:tgz dos2unix USE_LDCONFIG= ${PREFIX}/lib ${PREFIX}/lib/siod DOS2UNIX_FILES= sql_oracle.c ss.c -OPTIONS_DEFINE= SQL_SYBASE GD NDBM REGEX SS DOCS +OPTIONS_DEFINE= SQL_SYBASE GD NDBM REGEX SS STATFS DOCS OPTIONS_DEFINE_i386=SQL_ORACLE # oracle-client port only available for i386 OPTIONS_DEFAULT=NDBM REGEX SS +SQL_ORACLE_DESC=Build Oracle client-module (i386 only) SQL_SYBASE_DESC=Build Sybase (and MS-SQL) client-module (using FreeTDS) SS_DESC= Sockets support - required for any network programs NDBM_DESC= Support for NDBM-databases +STATFS_DESC= Module giving access to statfs(2) NO_WRKSUBDIR= yes EXTRACT_AFTER_ARGS=--exclude md5\* --exclude regex.h --exclude reg????*.c MAKE_ARGS= VPATH=${WRKSRC} MODULES=${MODULES:Q} @@ -33,7 +35,7 @@ MAKE_ENV+= MAN1PREFIX=${MAN1PREFIX} PREFIX=${PREFIX:Q} MAKE_ENV+= INSTALL_MAN=${INSTALL_MAN:Q} INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} MAKE_ENV+= INSTALL_DATA=${INSTALL_DATA:Q} -MODULES= tar parser_pratt +MODULES= statfs tar parser_pratt SQL_SYBASE_LIB_DEPENDS= libct.so:databases/freetds # Or freetds-devel GD_LIB_DEPENDS= libgd.so:graphics/gd # Or ukrainian/gd @@ -54,6 +56,11 @@ post-build: .include MODULES+= ${SELECTED_OPTIONS:NDOCS:tl} + +# XXX This should not be necessary: +.if ${ARCH} != i386 +PLIST_SUB+= SQL_ORACLE=@comment +.endif do-configure: ${MKDIR} ${WRKSRC}/lib Added: head/lang/siod/files/patch-statfs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/siod/files/patch-statfs Wed Feb 17 17:37:42 2021 (r565528) @@ -0,0 +1,97 @@ +--- statfs.c 2014-03-25 04:10:42.000000000 -0400 ++++ statfs.c 2021-02-17 12:25:44.681462000 -0500 +@@ -4,9 +4,15 @@ + + #include ++#ifdef HAVE_SYS_PARAM_H ++#include ++#endif + #include ++#ifndef BSD + #include ++#endif + #include + #include "siod.h" + ++#ifndef BSD + #define MNT_NUMTYPES 128 + /* +@@ -14,16 +20,28 @@ + */ + extern char *mnt_names[]; ++#endif + +-LISP lstatfs(LISP path) ++static LISP lstatfs(LISP path) + {long iflag; + struct statfs s; + iflag = no_interrupt(1); +- if (statfs(get_c_string(path),&s,sizeof(s))) ++ if (statfs(get_c_string(path), &s ++#ifndef BSD ++ ,sizeof(s) ++#endif ++ )) + return(err("statfs",llast_c_errmsg(-1))); ++ + no_interrupt(iflag); +- return(symalist("type",(((s.f_type >= 0) && (s.f_type < MNT_NUMTYPES) && ++ return(symalist("type", ++#ifdef BSD ++ s.f_fstypename[0] != '\0' ++ ? rintern(s.f_fstypename) ++#else ++ ((s.f_type >= 0) && (s.f_type < MNT_NUMTYPES) && + mnt_names[s.f_type]) + ? rintern(mnt_names[s.f_type]) +- : flocons(s.f_type)), ++#endif ++ : flocons(s.f_type), + "bsize",flocons(s.f_bsize), + "blocks",flocons(s.f_blocks), +@@ -34,8 +52,16 @@ + "mntonname",strcons(-1,s.f_mntonname), + "mntfromname",strcons(-1,s.f_mntfromname), ++#ifdef BSD ++ "syncwrites", flocons(s.f_syncwrites), ++ "asyncwrites", flocons(s.f_asyncwrites), ++ "syncreads", flocons(s.f_syncreads), ++ "asyncreads", flocons(s.f_asyncreads), ++ "namemax", flocons(s.f_namemax), ++#endif ++ /* TODO: Add decoding of f_flags */ + NULL));} + + +-static LISP decode_fstab(struct fstab *p) ++static LISP decode_fstab(const struct fstab *p) + {if (p) + return(symalist("spec",strcons(-1,p->fs_spec), +@@ -50,5 +76,5 @@ + return(NIL);} + +-LISP lgetfsent(void) ++static LISP lgetfsent(void) + {long iflag; + LISP result; +@@ -58,5 +84,5 @@ + return(result);} + +-LISP lsetfsent(void) ++static LISP lsetfsent(void) + {long iflag; + LISP result; +@@ -66,5 +92,5 @@ + return(result);} + +-LISP lendfsent(void) ++static LISP lendfsent(void) + {long iflag; + iflag = no_interrupt(1); +@@ -73,4 +99,6 @@ + return(NIL);} + ++void init_statfs(void); /* The sole symbol exported from a SIOD-module */ ++ + void init_statfs(void) + {init_subr_1("statfs",lstatfs); Modified: head/lang/siod/pkg-plist ============================================================================== --- head/lang/siod/pkg-plist Wed Feb 17 17:36:56 2021 (r565527) +++ head/lang/siod/pkg-plist Wed Feb 17 17:37:42 2021 (r565528) @@ -36,6 +36,7 @@ lib/siod/sql_msql.scm %%GD%%lib/siod/gd.so %%NDBM%%lib/siod/ndbm.so %%SS%%lib/siod/ss.so +lib/siod/statfs.so lib/siod/tar.so %%SQL_ORACLE%%lib/siod/sql_oracle.so %%SQL_SYBASE%%lib/siod/sql_sybase.so