On Thu, Feb 27, 2025 at 08:07:40PM +0100, Volker Schlecht wrote:
> On 2025-02-27 18:43, Stuart Henderson wrote:
> > two things definitely need changing:
> > 
> > - two symbols were removed; -DSQLITE_ENABLE_RTREE brings them back
> 
> Right, so does --enable-rtree - would that be ok as well?
> 
> > please add a BUILD_DEPENDS on lang/jimtcl so that the build environment

Erm, lang/jimtcl itself depends on databases/sqlite3 so it can't be
available in bulk builds started on clean machines, and we can't add
a build dep on it either.

I'd rather patch out the hidden dep so that the build is
deterministic, even on a machine where jimtcl is already installed.

> done
> 
> > personally I'd do these the other way round and get rid of ${VERSION} :
> > 
> >     rm ${PREFIX}/lib/libsqlite3.so{,.0}
> >     mv ${PREFIX}/lib/libsqlite3.so.* 
> > ${PREFIX}/lib/libsqlite3.so.${LIBsqlite3_VERSION}

I usually find this kind of construct suspicious, but indeed soname is
correctly passed and the resulting libsqlite.so.X.Y looks sane.

> Yup, done.

I'd suggest some tweaks below,

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/sqlite3/Makefile,v
> diff -u -p -r1.135 Makefile
> --- Makefile  27 Feb 2025 15:44:32 -0000      1.135
> +++ Makefile  27 Feb 2025 19:02:19 -0000
> @@ -1,11 +1,10 @@
>  COMMENT=     embedded SQL implementation
>  
> -DISTNAME =   sqlite-autoconf-3480000
> -PKGNAME=     sqlite3-3.48.0
> -REVISION=    1
> +DISTNAME =   sqlite-autoconf-3490100
> +PKGNAME=     sqlite3-3.49.1
>  
>  # XXX needs bumps every time :-
> -SHARED_LIBS +=  sqlite3                   37.31 # 8.6
> +SHARED_LIBS +=  sqlite3                   37.32 # 8.6
>  # sqlite suggests that users might like to assert() that library and header
>  # versions match, so bumps are needed even if function signatures don't 
> change.
>  # ... at the current time the only one noticed is a < check (in subversion)
> @@ -25,22 +24,43 @@ SITES =           ${HOMEPAGE}2025/
>  
>  DEBUG_PACKAGES=      ${BUILD_PACKAGES}
>  
> -CONFIGURE_STYLE= gnu
> -CONFIGURE_ARGS=      --disable-static-shell
> +CONFIGURE_ARGS=      --disable-static-shell \
> +             --soname=${LIBsqlite3_VERSION} \
> +             --prefix=${PREFIX} \
> +             --sysconfdir=${SYSCONFDIR} \
> +             --mandir=${PREFIX}/man \
> +             --localstatedir=${LOCALSTATEDIR}
> +
> +CONFIGURE_ENV =      CCACHE=None \
> +             CFLAGS='${CFLAGS}'
>  
> -# for x11/gnome/tracker
> +
> +CONFIGURE_ARGS +=    --enable-rtree
> + 
> +# originally for x11/gnome/tracker
>  CONFIGURE_ARGS +=    --enable-fts5
>  
>  # for mozilla
>  CFLAGS+=     -DSQLITE_ENABLE_UNLOCK_NOTIFY \
> -             -DSQLITE_ENABLE_FTS3 \
>               -DSQLITE_ENABLE_DBSTAT_VTAB \
> -             -DSQLITE_ENABLE_COLUMN_METADATA=1 \
> -             -DSQLITE_ENABLE_SESSION \
> -             -DSQLITE_ENABLE_PREUPDATE_HOOK
> +             -DSQLITE_ENABLE_COLUMN_METADATA
> +
> +CONFIGURE_ARGS +=    --enable-fts4 \
> +                     --enable-fts3
> +
> +# for deno
> +CONFIGURE_ARGS +=    --enable-session

I know you're not responsible for the current situation, but IMHO
those "for this" "andinitially for that" comments don't bring much
value .  One can look at cvs blame/log to understand why we enabled an
option.  I don't feel too strongly about it but the Makefile would be
more readable if we merged CONFIGURE_ARGS in a single block.

> +BUILD_DEPENDS =      converters/sqlite2mdoc \
> +             lang/jimtcl
> +
> +do-configure:
> +             cd ${WRKSRC} && \
> +             ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}

This lacks ${SETENV}, but instead of creating your own do-configure
I'd prefer that you use CONFIGURE_STYLE=simple which seems to work
just as fine.

> -BUILD_DEPENDS =      converters/sqlite2mdoc
>  post-install:
> +             rm ${PREFIX}/lib/libsqlite3.so{,.0}
> +             mv ${PREFIX}/lib/libsqlite3.so.* 
> ${PREFIX}/lib/libsqlite3.so.${LIBsqlite3_VERSION}
>               ${INSTALL_DATA_DIR} ${PREFIX}/man/man3
>               ${LOCALBASE}/bin/sqlite2mdoc -p ${PREFIX}/man/man3 
> ${PREFIX}/include/sqlite3.h
>               # fix the .pc file
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/databases/sqlite3/distinfo,v
> diff -u -p -r1.78 distinfo
> --- distinfo  29 Jan 2025 17:34:14 -0000      1.78
> +++ distinfo  27 Feb 2025 19:02:19 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (sqlite-autoconf-3480000.tar.gz) = 
> rJkvf8o5id5+0f6ZwWNj+Eh5TIwyoVja/U65J6LgL9U=
> -SIZE (sqlite-autoconf-3480000.tar.gz) = 3337615
> +SHA256 (sqlite-autoconf-3490100.tar.gz) = 
> EGZC2MyzbF9zI7ZOQVLptxn3wCFaz1v+rD1ef5e1klQ=
> +SIZE (sqlite-autoconf-3490100.tar.gz) = 3226385
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/databases/sqlite3/pkg/PLIST,v
> diff -u -p -r1.16 PLIST
> --- pkg/PLIST 27 Oct 2024 16:09:03 -0000      1.16
> +++ pkg/PLIST 27 Feb 2025 19:02:19 -0000
> @@ -3,7 +3,6 @@
>  include/sqlite3.h
>  include/sqlite3ext.h
>  @static-lib lib/libsqlite3.a
> -lib/libsqlite3.la
>  @lib lib/libsqlite3.so.${LIBsqlite3_VERSION}
>  lib/pkgconfig/sqlite3.pc
>  @man man/man1/sqlite3.1


-- 
jca

Reply via email to