Make a first attempt at a MacOS config for devel/ldapsdk.

Step towards PR 42040. (Next step is to actually make it work.)
This commit is contained in:
dholland 2022-05-15 02:19:36 +00:00
parent 2824729752
commit 18cbb1d13f
3 changed files with 45 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.43 2021/05/24 19:49:59 wiz Exp $
# $NetBSD: Makefile,v 1.44 2022/05/15 02:19:36 dholland Exp $
DISTNAME= ldapsdk_12311998
PKGNAME= ${DISTNAME:S/_/-/}
@ -33,6 +33,8 @@ AUTO_MKDIRS= yes
post-extract:
${LN} -s FreeBSD.mk ${WRKSRC}/config/DragonFly.mk
# copy rather than link this as it'll need to be patched
cp ${WRKSRC}/config/Rhapsody.mk ${WRKSRC}/config/Darwin.mk
do-configure:
${ECHO} "PKG_SYSCONFDIR=${PKG_SYSCONFDIR}" >> ${WRKSRC}/config/rules.mk

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.10 2021/10/26 10:15:13 nia Exp $
$NetBSD: distinfo,v 1.11 2022/05/15 02:19:36 dholland Exp $
BLAKE2s (ldapsdk_12311998.tar.gz) = eb99121e1a286a42be4f46cc1d818aebc38156e5b9be0caad45773ec979291cb
SHA512 (ldapsdk_12311998.tar.gz) = 0e6a1fc33d4d70bba2a376336a0cf93fe7aa1e2147256ba6bc5de323c62139824ac0df66b2ebef6edcda457ba6437ca251112370c9e154bc09960c40429416b4
@ -10,4 +10,5 @@ SHA1 (patch-ad) = 023fb7d066a3b0e9fde391e37ce14751c7816e7d
SHA1 (patch-ae) = fe40aa1668206bd63861844fc34574c749aa22f0
SHA1 (patch-af) = 20869b8cbc7becee026adece14b9b9a250531d8a
SHA1 (patch-config-bsdecho.c) = a5f916c44c55a812793c25760771bff5a1400ed0
SHA1 (patch-config_darwin.mk) = d713cd4d018825a1ad8c7631e25f3a070de3f9c2
SHA1 (patch-config_rules_mk) = 6ddd1ee99f4058eeddd3f34f6921c1573abcd125

View file

@ -0,0 +1,40 @@
$NetBSD: patch-config_darwin.mk,v 1.1 2022/05/15 02:19:36 dholland Exp $
Halfassed attempt at a config for MacOS based on the existing one for
Rhapsody (aka prelease MacOS from 25 years ago) -- probably won't
work, but will work better than the prior state of not having one at
all.
--- config/Darwin.mk.orig 2022-05-15 02:08:50.742530570 +0000
+++ config/Darwin.mk
@@ -23,11 +23,11 @@
# Version-independent
######################################################################
-ARCH := rhapsody
+ARCH := darwin
ifeq (86,$(findstring 86,$(OS_TEST)))
CPU_ARCH := i386
else
-CPU_ARCH := ppc
+CPU_ARCH := $(OS_TEST)
endif
GFX_ARCH :=
@@ -92,14 +92,12 @@ endif
CC = cc
AR = libtool -static -o $@
-EMACS = /usr/bin/emacs
-PERL = /usr/bin/perl
+EMACS = /usr/bin/true
RANLIB = ranlib
LDFLAGS =
-# -nostdlib gets around the missing -lm problem.
-DSO_LDFLAGS = -arch $(CPU_ARCH) -dynamiclib -nostdlib -lstdc++ -lcc_dynamic -compatibility_version 1 -current_version 1 -all_load -undefined suppress
+DSO_LDFLAGS =
# Comment out MKSHLIB to build only static libraries.
MKSHLIB = $(CC) $(DSO_LDFLAGS)