pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

adasat: lint package, add shlib options handling



Module Name:	pkgsrc-wip
Committed By:	Dmytro Kazankov <dkazankov%NetBSD.org@localhost>
Pushed By:	dkazankov
Date:		Tue May 20 06:06:55 2025 +0300
Changeset:	19ae9270a3cf666630e49274708e26a8bef88e08

Modified Files:
	adasat/Makefile
	adasat/buildlink3.mk
	adasat/distinfo
	adasat/patches/patch-Makefile
Added Files:
	adasat/options.mk
Removed Files:
	adasat/PLIST

Log Message:
adasat: lint package, add shlib options handling

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=19ae9270a3cf666630e49274708e26a8bef88e08

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 adasat/Makefile               | 29 ++++++++-------
 adasat/PLIST                  | 82 -------------------------------------------
 adasat/buildlink3.mk          | 11 +++---
 adasat/distinfo               |  2 +-
 adasat/options.mk             | 19 ++++++++++
 adasat/patches/patch-Makefile |  8 +++--
 6 files changed, 47 insertions(+), 104 deletions(-)

diffs:
diff --git a/adasat/Makefile b/adasat/Makefile
index 761073f0a8..49083c3314 100644
--- a/adasat/Makefile
+++ b/adasat/Makefile
@@ -1,36 +1,39 @@
 # $NetBSD: Makefile,v 1.0 2024/05/06 15:00:00 dkazankov Exp $
 
-PKGNAME=	adasat-25.0.0
-CATEGORIES=	math
-COMMENT=	Implementation of a DPLL-based SAT solver in Ada
-
 DISTNAME=	AdaSAT-${PKGVERSION_NOREV}
+PKGNAME=	adasat-25.0.0
+CATEGORIES=	math devel
 MASTER_SITES=	${MASTER_SITE_GITHUB:=AdaCore/}
-GITHUB_TAG=	v${PKGVERSION_NOREV}
 GITHUB_PROJECT=	AdaSAT
+GITHUB_TAG=	v${PKGVERSION_NOREV}
 
+MAINTAINER=	dkazankov%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/AdaCore/AdaSAT
+COMMENT=	Implementation of a DPLL-based SAT solver in Ada
 LICENSE=	apache-2.0
 
 USE_TOOLS+=	gmake
 
 USE_LANGUAGES=	ada
-
+# See xmlada package for rationale
 GCC_REQD+=	13
 
-MAKE_FLAGS=	BUILD_MODE=prod
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+ALL_LIBRARY_TYPES?=	static static-pic relocatable
+
+MAKE_FLAGS+=	BUILD_MODE=prod
+MAKE_FLAGS+=	ALL_LIBRARY_TYPES=${ALL_LIBRARY_TYPES:Q}
 BUILD_TARGET=	all-libs
 
-INSTALL_MAKE_FLAGS=	INSTALL_DIR=${DESTDIR}${PREFIX}
+INSTALL_MAKE_FLAGS+=	INSTALL_DIR=${DESTDIR}${PREFIX}
+INSTALL_MAKE_FLAGS+=	ALL_LIBRARY_TYPES=${ALL_LIBRARY_TYPES:Q}
 
 GENERATE_PLIST+= \
 	cd ${DESTDIR}${PREFIX} && \
 	${FIND} include lib share \( -type f -or -type l \) -print | ${SORT};
 
-.include "../../mk/bsd.prefs.mk"
-
-
-.include "../../lang/gcc13-gnat-libs/buildlink3.mk"
-.include "../../wip/gprbuild/buildlink3.mk"
+.include "../../devel/gprbuild/buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/adasat/PLIST b/adasat/PLIST
deleted file mode 100644
index 329b72b8c5..0000000000
--- a/adasat/PLIST
+++ /dev/null
@@ -1,82 +0,0 @@
-@comment $NetBSD: PLIST,v 1.0 2024/05/13 11:00:00 dkazankov Exp $
-include/adasat.relocatable/adasat-builders.adb
-include/adasat.relocatable/adasat-builders.ads
-include/adasat.relocatable/adasat-decisions.adb
-include/adasat.relocatable/adasat-decisions.ads
-include/adasat.relocatable/adasat-dpll.adb
-include/adasat.relocatable/adasat-dpll.ads
-include/adasat.relocatable/adasat-formulas.adb
-include/adasat.relocatable/adasat-formulas.ads
-include/adasat.relocatable/adasat-helpers.adb
-include/adasat.relocatable/adasat-helpers.ads
-include/adasat.relocatable/adasat-internals.ads
-include/adasat.relocatable/adasat-theory.ads
-include/adasat.relocatable/adasat-vectors.adb
-include/adasat.relocatable/adasat-vectors.ads
-include/adasat.relocatable/adasat.adb
-include/adasat.relocatable/adasat.ads
-include/adasat.static-pic/adasat-builders.adb
-include/adasat.static-pic/adasat-builders.ads
-include/adasat.static-pic/adasat-decisions.adb
-include/adasat.static-pic/adasat-decisions.ads
-include/adasat.static-pic/adasat-dpll.adb
-include/adasat.static-pic/adasat-dpll.ads
-include/adasat.static-pic/adasat-formulas.adb
-include/adasat.static-pic/adasat-formulas.ads
-include/adasat.static-pic/adasat-helpers.adb
-include/adasat.static-pic/adasat-helpers.ads
-include/adasat.static-pic/adasat-internals.ads
-include/adasat.static-pic/adasat-theory.ads
-include/adasat.static-pic/adasat-vectors.adb
-include/adasat.static-pic/adasat-vectors.ads
-include/adasat.static-pic/adasat.adb
-include/adasat.static-pic/adasat.ads
-include/adasat.static/adasat-builders.adb
-include/adasat.static/adasat-builders.ads
-include/adasat.static/adasat-decisions.adb
-include/adasat.static/adasat-decisions.ads
-include/adasat.static/adasat-dpll.adb
-include/adasat.static/adasat-dpll.ads
-include/adasat.static/adasat-formulas.adb
-include/adasat.static/adasat-formulas.ads
-include/adasat.static/adasat-helpers.adb
-include/adasat.static/adasat-helpers.ads
-include/adasat.static/adasat-internals.ads
-include/adasat.static/adasat-theory.ads
-include/adasat.static/adasat-vectors.adb
-include/adasat.static/adasat-vectors.ads
-include/adasat.static/adasat.adb
-include/adasat.static/adasat.ads
-lib/adasat.relocatable/adasat-builders.ali
-lib/adasat.relocatable/adasat-decisions.ali
-lib/adasat.relocatable/adasat-dpll.ali
-lib/adasat.relocatable/adasat-formulas.ali
-lib/adasat.relocatable/adasat-helpers.ali
-lib/adasat.relocatable/adasat-internals.ali
-lib/adasat.relocatable/adasat-theory.ali
-lib/adasat.relocatable/adasat-vectors.ali
-lib/adasat.relocatable/adasat.ali
-lib/adasat.relocatable/libadasat.so
-lib/adasat.static-pic/adasat-builders.ali
-lib/adasat.static-pic/adasat-decisions.ali
-lib/adasat.static-pic/adasat-dpll.ali
-lib/adasat.static-pic/adasat-formulas.ali
-lib/adasat.static-pic/adasat-helpers.ali
-lib/adasat.static-pic/adasat-internals.ali
-lib/adasat.static-pic/adasat-theory.ali
-lib/adasat.static-pic/adasat-vectors.ali
-lib/adasat.static-pic/adasat.ali
-lib/adasat.static-pic/libadasat.a
-lib/adasat.static/adasat-builders.ali
-lib/adasat.static/adasat-decisions.ali
-lib/adasat.static/adasat-dpll.ali
-lib/adasat.static/adasat-formulas.ali
-lib/adasat.static/adasat-helpers.ali
-lib/adasat.static/adasat-internals.ali
-lib/adasat.static/adasat-theory.ali
-lib/adasat.static/adasat-vectors.ali
-lib/adasat.static/adasat.ali
-lib/adasat.static/libadasat.a
-lib/libadasat.so
-share/gpr/adasat.gpr
-share/gpr/manifests/adasat
diff --git a/adasat/buildlink3.mk b/adasat/buildlink3.mk
index bdacbdf248..8367247b53 100644
--- a/adasat/buildlink3.mk
+++ b/adasat/buildlink3.mk
@@ -5,16 +5,17 @@ BUILDLINK_TREE+=	adasat
 .if !defined(ADASAT_BUILDLINK3_MK)
 ADASAT_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.adasat+=	adasat>=24.0
-BUILDLINK_PKGSRCDIR.adasat=	../../wip/adasat
+BUILDLINK_API_DEPENDS.adasat+=	adasat>=24.0.0
+BUILDLINK_ABI_DEPENDS.adasat+=	adasat>=25.0.0
+BUILDLINK_PKGSRCDIR.adasat?=	../../wip/adasat
 BUILDLINK_DEPMETHOD.adasat?=	build
 
-BUILDLINK_FILES.adasat=		include/adasat*/* lib/libadasat* lib/adasat*/*
-BUILDLINK_FILES.adasat+=	share/gpr/manifests/adasat share/gpr/adasat.gpr
-
 BUILDLINK_CONTENTS_FILTER.adasat=	\
 	${EGREP} '(include/.*\.ads$$|lib/.*\.ali$$|lib/.*\.a$$|lib/.*\.so.*$$|share/gpr/manifests/.*|share/gpr/.*\.gpr$$)'
 
+pkgbase := adasat
+.include "../../mk/pkg-build-options.mk"
+
 .endif
 
 BUILDLINK_TREE+=	-adasat
diff --git a/adasat/distinfo b/adasat/distinfo
index 0e8bb09743..0d9b43bb43 100644
--- a/adasat/distinfo
+++ b/adasat/distinfo
@@ -3,4 +3,4 @@ $NetBSD$
 BLAKE2s (AdaSAT-25.0.0.tar.gz) = 82395941685f2006742a211de0129b62097c90c87a47a93da9adbf1ca951f55a
 SHA512 (AdaSAT-25.0.0.tar.gz) = 7781a683c5aef9efa9a6b57e82070184c02d734fcf448aa5aa79d9aaa3b40d181d87d7487d9c204f7dcd584a3d2dc1c9ebc027e82b2532c3418c25a2395fd9af
 Size (AdaSAT-25.0.0.tar.gz) = 30707 bytes
-SHA1 (patch-Makefile) = cb83a09545fc09ff39e3ce42cbf0c4c64627106d
+SHA1 (patch-Makefile) = e75fc73d66601d816efe81ceb8c011fbe2460e0b
diff --git a/adasat/options.mk b/adasat/options.mk
new file mode 100644
index 0000000000..2d1f1b6f4f
--- /dev/null
+++ b/adasat/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2025/05/09 16:00:00 dkazankov Exp $
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.adasat
+PKG_OPTIONS_OPTIONAL_GROUPS=	shared-libs
+PKG_OPTIONS_GROUP.shared-libs=	enable-shared-libs disable-shared-libs
+
+.include "../../mk/bsd.fast.prefs.mk"
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Menable-shared-libs)
+ALL_LIBRARY_TYPES=	static static-pic relocatable
+USE_GCC_RUNTIME=	yes
+.endif
+.if !empty(PKG_OPTIONS:Mdisable-shared-libs)
+ALL_LIBRARY_TYPES=	static static-pic
+.endif
+.if empty(PKG_OPTIONS:Menable-shared-libs) && empty(PKG_OPTIONS:Mdisable-shared-libs)
+USE_GCC_RUNTIME=	yes
+.endif
diff --git a/adasat/patches/patch-Makefile b/adasat/patches/patch-Makefile
index 678659ad1f..58b6649c3a 100644
--- a/adasat/patches/patch-Makefile
+++ b/adasat/patches/patch-Makefile
@@ -1,20 +1,22 @@
 $NetBSD: patch-Makefile,v 1.0 2024/08/12 23:00:00 dkazankov Exp $
 
 Add gprbuild and gprinstall options
+Make ALL_LIBRARY_TYPES externally settable
 
 --- Makefile.orig	2024-01-03 19:00:52.000000000 +0200
 +++ Makefile
-@@ -4,6 +4,9 @@
+@@ -4,19 +4,23 @@
  BUILD_DIR ?= .
  INSTALL_DIR ?= .
  
+-ALL_LIBRARY_TYPES = static static-pic relocatable
 +GPRBUILD_OPTIONS ?= -p -j$(PROCESSORS)
 +GPRINSTALL_OPTIONS =
 +
- ALL_LIBRARY_TYPES = static static-pic relocatable
++ALL_LIBRARY_TYPES ?= static static-pic relocatable
  
  .PHONY: lib
-@@ -11,12 +14,13 @@
+ lib:
  	gprbuild -k -P adasat.gpr -p -j$(PROCESSORS) \
  		--relocate-build-tree="$(BUILD_DIR)" \
  		-XLIBRARY_TYPE=$(LIBRARY_TYPE) \


Home | Main Index | Thread Index | Old Index