Skip to content

Commit 84c1308

Browse files
committed
polyorb: lint package, add shlib options handling, add ssl support
1 parent 4447afc commit 84c1308

File tree

10 files changed

+175
-65
lines changed

10 files changed

+175
-65
lines changed

polyorb/DESCR

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
PolyORB is a polymorphic, reusable infrastructure for building object-oriented distributed systems
1+
PolyORB is a polymorphic infrastructure for building distributed systems
22

3-
PolyORB is a polymorphic, reusable infrastructure for building or prototyping new middleware
4-
adapted to specific application needs. It provides a set of components on top of which
5-
various instances can be elaborated. These instances (or personalities) are views on PolyORB
6-
facilities that are compliant to existing standards, either at the API level (application
7-
personality) or at the protocol level (protocol personality).
3+
PolyORB is a polymorphic, reusable infrastructure for building or prototyping
4+
new middleware adapted to specific application needs. It provides a set of
5+
components on top of which various instances can be elaborated. These instances
6+
(or personalities) are views on PolyORB facilities that are compliant to
7+
existing standards, either at the API level (application personality) or at the
8+
protocol level (protocol personality).

polyorb/Makefile

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
# $NetBSD: Makefile,v 1.3 2024/11/14 14:00:00 dkazankov Exp $
22

3+
DISTNAME= polyorb-${PKGVERSION_NOREV}
34
PKGNAME= polyorb-25.0.0
45
CATEGORIES= devel
5-
MAINTAINER= [email protected]
6-
HOMEPAGE= https://github.com/AdaCore/PolyORB
7-
COMMENT= PolyORB is a polymorphic, reusable infrastructure for building object-oriented distributed systems
8-
LICENSE= gnu-gpl-v2
9-
10-
DISTNAME= polyorb-${PKGVERSION_NOREV}
116
MASTER_SITES= ${MASTER_SITE_GITHUB:=AdaCore/}
7+
GITHUB_PROJECT= PolyORB
128
# Latest commit in 25.0 branch
139
GITHUB_TAG= 43673925892098c14daca8b9b66c5017887b71d8
14-
GITHUB_PROJECT= PolyORB
1510

16-
USE_TOOLS+= awk autoconf automake gmake
11+
MAINTAINER= [email protected]
12+
HOMEPAGE= https://github.com/AdaCore/PolyORB
13+
COMMENT= Polymorphic, reusable infrastructure for building distributed systems
14+
LICENSE= gnu-gpl-v2
15+
16+
USE_TOOLS+= awk gmake
1717
GNU_CONFIGURE= yes
1818

1919
CHECK_PIE_SKIP+= bin/*
2020

2121
USE_LANGUAGES= c ada
22-
22+
# See xmlada package for rationale
2323
GCC_REQD+= 13
2424

25+
.include "../../mk/bsd.prefs.mk"
26+
.include "options.mk"
27+
2528
OVERRIDE_RELEASE_PLACEHOLDER= 25.0w
2629
ADDITIONAL_VERSION_PLACEHOLDER=
2730

@@ -31,38 +34,21 @@ SUBST_MESSAGE.version= Set version
3134
SUBST_VARS.version= OVERRIDE_RELEASE_PLACEHOLDER ADDITIONAL_VERSION_PLACEHOLDER
3235
SUBST_FILES.version= configure
3336

34-
.include "../../mk/bsd.prefs.mk"
35-
36-
.include "options.mk"
37-
38-
OBJDIR= ${WRKDIR}/build
39-
4037
CONFIGURE_ARGS+= --prefix=${DESTDIR}${PREFIX}
4138
CONFIGURE_ARGS+= --with-appli-perso=${APP_PERSONALITIES:Q}
4239
CONFIGURE_ARGS+= --with-proto-perso=${PROTOCOL_PERSONALITIES:Q}
4340
CONFIGURE_ARGS+= --with-corba-services=${CORBA_SERVICES:Q}
44-
45-
INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
46-
4741
EXTRA_GNATMAKE_FLAGS+= -eL -R -largs $${LDFLAGS} -margs
48-
BUILD_MAKE_FLAGS+= EXTRA_GNATMAKE_FLAGS=${EXTRA_GNATMAKE_FLAGS:Q}
49-
50-
.include "../../lang/gcc13-gnat-libs/buildlink3.mk"
51-
.include "../../wip/gprbuild/buildlink3.mk"
52-
53-
.include "../../security/openssl/buildlink3.mk"
42+
CONFIGURE_ENV+= EXTRA_GNATMAKE_FLAGS=${EXTRA_GNATMAKE_FLAGS:Q}
5443

55-
BUILDLINK_DEPMETHOD.xmlada= full
56-
.include "../../wip/xmlada/buildlink3.mk"
57-
58-
.include "../../wip/gprlib/buildlink3.mk"
59-
.include "../../wip/gnatcoll-core/buildlink3.mk"
60-
61-
PYTHON_VERSIONS_ACCEPTED= 312 311 310 39 38
62-
.include "../../lang/python/tool.mk"
44+
INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX}
6345

6446
GENERATE_PLIST+= \
6547
cd ${DESTDIR}${PREFIX} && \
6648
${FIND} bin include lib \( -type f -or -type l \) -print | ${SORT};
6749

50+
.include "../../devel/gprbuild/buildlink3.mk"
51+
52+
.include "../../lang/python/tool.mk"
53+
6854
.include "../../mk/bsd.pkg.mk"

polyorb/PLIST

Lines changed: 0 additions & 1 deletion
This file was deleted.

polyorb/buildlink3.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ BUILDLINK_TREE+= polyorb
55
.if !defined(POLYORB_BUILDLINK3_MK)
66
POLYORB_BUILDLINK3_MK:=
77

8-
BUILDLINK_API_DEPENDS.polyorb+= polyorb>=25.0
9-
BUILDLINK_PKGSRCDIR.polyorb= ../../wip/polyorb
8+
BUILDLINK_API_DEPENDS.polyorb+= polyorb>=25.0.0
9+
BUILDLINK_PKGSRCDIR.polyorb?= ../../wip/polyorb
1010
BUILDLINK_DEPMETHOD.polyorb?= build
1111

12-
BUILDLINK_AUTO_VARS.polyorb= no
13-
BUILDLINK_AUTO_DIRS.polyorb= no
12+
pkgbase := polyorb
13+
.include "../../mk/pkg-build-options.mk"
1414

1515
.endif
1616

polyorb/distinfo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ SHA512 (polyorb-25.0.0-43673925892098c14daca8b9b66c5017887b71d8.tar.gz) = 604457
55
Size (polyorb-25.0.0-43673925892098c14daca8b9b66c5017887b71d8.tar.gz) = 2874796 bytes
66
SHA1 (patch-Makefile.common.project.in) = 03f43f1a8dee02833e39be26dcc5ffb751f25268
77
SHA1 (patch-compilers_gnatdist_xe__back-garlic.adb) = 56f9d6614fccb0fc540bcef1183cfe6a47f45919
8-
SHA1 (patch-configure) = 923a5e24fa2c0e09985f555d493fac8c9e72bd85
8+
SHA1 (patch-configure) = e82a58b42d3c190966fa90cea83106eb165be1d8
99
SHA1 (patch-projects_polyorb__src__aws.gpr) = 2fe33ff7165001e7e90b17c635af8b650862b916
10+
SHA1 (patch-src_security_tls_polyorb-tls.adb) = 364ec157dd67bfd51478d2e52d6abe03a6baa307
11+
SHA1 (patch-src_security_tls_polyorb-tls.ads) = 3d368a923977e4476077723b41b14103330c9a97
12+
SHA1 (patch-src_security_x509_polyorb-x509.adb) = 20ab2472068cb06c034e8e83bb28c70957c659c4
1013
SHA1 (patch-src_security_x509_polyorb__x509.c) = 372c480df9bebd43a0f37e96381fe27ef2df8419
1114
SHA1 (patch-src_ssl_polyorb-ssl.adb) = a1db67e4b26ac8c7d2e8173635ce2695041d406c
1215
SHA1 (patch-src_ssl_polyorb-ssl.ads) = 731a74d78d04dc15fcb7d991d689678f6822f8cc

polyorb/options.mk

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,60 @@
11
# $NetBSD: options.mk,v 1.0 2024/12/02 15:00:00 dkazankov Exp $
22

3-
PKG_OPTIONS_VAR= PKG_OPTIONS.PolyORB
4-
PKG_SUPPORTED_OPTIONS= ap-corba ap-dsa ap-moma ap-aws \
5-
pp-giop pp-soap pp-srp pp-dns \
6-
cs-event cs-ir cs-naming cs-notification cs-time \
7-
shared openssl builtin-openssl gnatcoll
3+
PKG_OPTIONS_VAR= PKG_OPTIONS.polyorb
4+
PKG_SUPPORTED_OPTIONS= ap-corba ap-dsa ap-moma ap-aws \
5+
pp-giop pp-soap pp-srp pp-dns \
6+
cs-event cs-ir cs-naming cs-notification cs-time \
7+
gnatcoll
8+
PKG_OPTIONS_OPTIONAL_GROUPS= shared-libs openssl
9+
PKG_OPTIONS_GROUP.shared-libs= enable-shared-libs disable-shared-libs
10+
PKG_OPTIONS_GROUP.openssl= openssl builtin-openssl
811

912
.include "../../mk/bsd.fast.prefs.mk"
1013

1114
PKG_SUGGESTED_OPTIONS= ap-corba ap-dsa ap-moma \
12-
pp-giop pp-soap pp-srp pp-dns \
13-
cs-event cs-ir cs-naming cs-notification cs-time \
14-
builtin-openssl gnatcoll
15+
pp-giop pp-soap pp-srp pp-dns \
16+
cs-event cs-ir cs-naming cs-notification cs-time \
17+
builtin-openssl gnatcoll
1518

1619
.include "../../mk/bsd.options.mk"
1720

21+
.if !empty(PKG_OPTIONS:Menable-shared-libs)
22+
CONFIGURE_ARGS+= --enable-shared
23+
CONFIGURE_ARGS+= --with-gprbuild=gprbuild
24+
USE_GCC_RUNTIME= yes
25+
BUILDLINK_DEPMETHOD.xmlada= full
26+
BUILDLINK_DEPMETHOD.gprlib= full
27+
BUILDLINK_DEPMETHOD.gnatcoll-core= full
28+
.endif
29+
.if !empty(PKG_OPTIONS:Mdisable-shared-libs)
30+
CONFIGURE_ARGS+= --disable-shared
31+
.endif
32+
.if empty(PKG_OPTIONS:Menable-shared-libs) && empty(PKG_OPTIONS:Mdisable-shared-libs)
33+
CONFIGURE_ARGS+= --with-gprbuild=gprbuild
34+
USE_GCC_RUNTIME= yes
35+
BUILDLINK_DEPMETHOD.xmlada= full
36+
BUILDLINK_DEPMETHOD.gprlib= full
37+
BUILDLINK_DEPMETHOD.gnatcoll-core= full
38+
.endif
39+
1840
.if !empty(PKG_OPTIONS:Mbuiltin-openssl)
19-
.include "../../security/openssl/builtin.mk"
41+
USE_BUILTIN.openssl= yes
42+
.include "../../security/openssl/buildlink3.mk"
2043
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
2144
.elif !empty(PKG_OPTIONS:Mopenssl)
45+
USE_BUILTIN.openssl= no
2246
.include "../../security/openssl/buildlink3.mk"
2347
CONFIGURE_ARGS+= --with-openssl=${SSLBASE}
2448
.else
2549
.endif
2650

2751
.if !empty(PKG_OPTIONS:Mgnatcoll)
52+
.include "../../wip/xmlada/buildlink3.mk"
53+
.include "../../wip/gprlib/buildlink3.mk"
54+
.include "../../wip/gnatcoll-core/buildlink3.mk"
2855
CONFIGURE_ARGS+= --with-gnatcoll
2956
.endif
3057

31-
.if !empty(PKG_OPTIONS:Mshared)
32-
CONFIGURE_ARGS+= --enable-shared
33-
CONFIGURE_ARGS+= --with-gprbuild=gprbuild
34-
.endif
35-
3658
.if !empty(PKG_OPTIONS:Map-aws)
3759
APP_PERSONALITIES+= aws
3860
.endif

polyorb/patches/patch-configure

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
$NetBSD: patch-configure,v 1.0 2024/12/17 20:00:00 dkazankov Exp $
22

3-
Fix usage of old function
3+
Fix usage of old SSL function
44
Fix later linker error when using SSL
55
Fix $$ORIGIN substitution in LDFLAGS
66

77
--- configure.orig 2024-08-23 19:03:44.000000000 +0300
8-
+++ configure 2025-01-24 10:12:03.567050383 +0200
8+
+++ configure
99
@@ -7859,8 +7859,8 @@
1010
# unset ac_cv_XXX to prevent reuse of cached results from a previous
1111
# iteration.
@@ -39,17 +39,17 @@ Fix $$ORIGIN substitution in LDFLAGS
3939
+ SSL_LINKER_OPTION1=$1
4040
+ case $SSL_LINKER_OPTION1 in
4141
+ -L*/)
42-
+ SSL_LINKER_OPTION1=${SSL_LINKER_OPTION1}
43-
+ ;;
42+
+ SSL_LINKER_OPTION1=${SSL_LINKER_OPTION1}
43+
+ ;;
4444
+ -L*)
45-
+ SSL_LINKER_OPTION1=${SSL_LINKER_OPTION1}/
46-
+ ;;
45+
+ SSL_LINKER_OPTION1=${SSL_LINKER_OPTION1}/
46+
+ ;;
4747
+ esac
4848
+ SSL_LINKER_OPTIONS="${SSL_LINKER_OPTIONS}\"${SSL_LINKER_OPTION1}\""
4949
if test $# -gt 1; then
5050
SSL_LINKER_OPTIONS="${SSL_LINKER_OPTIONS} & ASCII.NUL & "
5151
fi
52-
@@ -9457,6 +9468,9 @@
52+
@@ -9457,6 +9466,9 @@
5353
keylen = length(key)
5454
if (S_is_set[key]) {
5555
value = S[key]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
$NetBSD: patch-src_security_tls_polyorb-tls.adb,v 1.0 2024/12/17 20:00:00 dkazankov Exp $
2+
3+
Fix deprecated functions
4+
5+
--- src/security/tls/polyorb-tls.adb.orig 2024-08-23 19:03:44.000000000 +0300
6+
+++ src/security/tls/polyorb-tls.adb
7+
@@ -223,9 +223,10 @@
8+
9+
-- Library initialization
10+
11+
- procedure SSL_library_init;
12+
-
13+
- procedure SSL_load_error_strings;
14+
+ function OPENSSL_init_ssl
15+
+ (Opts : Interfaces.C.unsigned_long_long;
16+
+ settings : INIT_SETTINGS_ACCESS)
17+
+ return Interfaces.C.int;
18+
19+
-- PolyORB extensions
20+
21+
@@ -270,9 +271,8 @@
22+
pragma Import (C, SSL_get_cipher_list, "SSL_get_cipher_list");
23+
pragma Import (C, SSL_get_ciphers, "SSL_get_ciphers");
24+
pragma Import (C, SSL_get_fd, "SSL_get_fd");
25+
- pragma Import (C, SSL_get_peer_certificate, "SSL_get_peer_certificate");
26+
- pragma Import (C, SSL_library_init, "SSL_library_init");
27+
- pragma Import (C, SSL_load_error_strings, "SSL_load_error_strings");
28+
+ pragma Import (C, SSL_get_peer_certificate, "SSL_get1_peer_certificate");
29+
+ pragma Import (C, OPENSSL_init_ssl, "OPENSSL_init_ssl");
30+
pragma Import (C, SSL_new, "SSL_new");
31+
pragma Import (C, SSL_pending, "SSL_pending");
32+
pragma Import (C, SSL_read, "SSL_read");
33+
@@ -549,9 +549,11 @@
34+
----------------
35+
36+
procedure Initialize is
37+
+ Result : Interfaces.C.int := Thin.OPENSSL_init_ssl (0, null);
38+
begin
39+
- Thin.SSL_load_error_strings;
40+
- Thin.SSL_library_init;
41+
+ if Result = 0 then
42+
+ null;
43+
+ end if;
44+
-- XXX actions_to_seed_PRNG
45+
end Initialize;
46+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
$NetBSD: patch-src_security_tls_polyorb-tls.adb,v 1.0 2024/12/17 20:00:00 dkazankov Exp $
2+
3+
Fix deprecated init function
4+
5+
--- src/security/tls/polyorb-tls.ads.orig 2024-08-23 19:03:44.000000000 +0300
6+
+++ src/security/tls/polyorb-tls.ads
7+
@@ -50,6 +50,8 @@
8+
9+
type TLS_Verification_Mode is array (TLS_Verification_Mode_Flag) of Boolean;
10+
11+
+ type INIT_SETTINGS_ACCESS is private;
12+
+
13+
type TLS_Context_Type is private;
14+
15+
type TLS_Cipher_Type is private;
16+
@@ -189,6 +191,10 @@
17+
18+
private
19+
20+
+ type OPENSSL_INIT_SETTINGS is null record;
21+
+ pragma Convention (C, OPENSSL_INIT_SETTINGS);
22+
+ type INIT_SETTINGS_ACCESS is access all OPENSSL_INIT_SETTINGS;
23+
+
24+
-- TLS Context
25+
26+
type TLS_Context_Record is null record;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
$NetBSD: patch-src_security_x509_polyorb-x509.adb,v 1.0 2024/12/17 20:00:00 dkazankov Exp $
2+
3+
Fix removed deprecated function import
4+
5+
--- src/security/x509/polyorb-x509.adb.orig 2024-08-23 19:03:44.000000000 +0300
6+
+++ src/security/x509/polyorb-x509.adb
7+
@@ -179,7 +179,6 @@
8+
9+
private
10+
11+
- pragma Import (C, CRYPTO_num_locks, "CRYPTO_num_locks");
12+
pragma Import (C, Get_CRYPTO_LOCK, "__PolyORB_Get_CRYPTO_LOCK");
13+
pragma Import (C, ERR_get_error, "ERR_get_error");
14+
pragma Import (C, ERR_load_PolyORB_strings, "ERR_load_PolyORB_strings");
15+
@@ -729,6 +728,12 @@
16+
17+
package body Thin is
18+
19+
+ function CRYPTO_num_locks return C.int
20+
+ is
21+
+ begin
22+
+ return 1;
23+
+ end CRYPTO_num_locks;
24+
+
25+
----------------------
26+
-- ERR_error_string --
27+
----------------------

0 commit comments

Comments
 (0)