public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-apps@cygwin.com
Subject: Re: [ITA] tdb
Date: Tue, 20 Feb 2024 23:54:05 +0900	[thread overview]
Message-ID: <20240220235405.70b78774da0414a75a265329@nifty.ne.jp> (raw)
In-Reply-To: <20240220194100.8a306f7b261265f3695c6bbd@nifty.ne.jp>

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

On Tue, 20 Feb 2024 19:41:00 +0900
Takashi Yano wrote:
> I would like to adopt tdb package.

cygport file revised.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

[-- Attachment #2: 1.2.9-cygwin.patch --]
[-- Type: text/plain, Size: 1309 bytes --]

--- origsrc/tdb-1.2.9/buildtools/wafsamba/samba_conftests.py	2010-12-15 04:46:16.000000000 -0600
+++ src/tdb-1.2.9/buildtools/wafsamba/samba_conftests.py	2011-12-12 01:30:34.239867900 -0600
@@ -247,7 +247,10 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=Fa
     # path for execution
     lastprog = o.link_task.outputs[0].abspath(env)
 
-    if not rpath:
+    if sys.platform == 'cygwin':
+        os.putenv('PATH', os.path.join(bdir, 'default/libdir') + ':' + os.environ['PATH'])
+        old_ld_library_path = None
+    elif not rpath:
         if 'LD_LIBRARY_PATH' in os.environ:
             old_ld_library_path = os.environ['LD_LIBRARY_PATH']
         else:
--- origsrc/tdb-1.2.9/buildtools/wafsamba/samba_install.py	2010-12-20 19:00:02.000000000 -0600
+++ src/tdb-1.2.9/buildtools/wafsamba/samba_install.py	2011-12-12 04:54:36.377078100 -0600
@@ -159,6 +159,12 @@ def apply_vscript(self):
             self.version_script)
         self.version_script = None
 
+@feature('cshlib')
+def apply_implib(self):
+    if self.env.DEST_BINFMT == 'pe':
+        self.env.append_value('LINKFLAGS', "-Wl,--out-implib,lib%s.dll.a" %
+            os.path.split(self.target)[1])
+
 
 ##############################
 # handle the creation of links for libraries and binaries in the build tree

[-- Attachment #3: tdb.cygport --]
[-- Type: text/plain, Size: 1467 bytes --]

inherit python3

NAME="tdb"
VERSION=1.4.10
RELEASE=1
LICENSE="LGPL-3.0-or-later"
CATEGORY="Database"
SUMMARY="Trivial Database"
DESCRIPTION="TDB is a Trivial Database. In concept, it is very much like GDBM,
and BSD's DB except that it allows multiple simultaneous writers and uses
locking internally to keep writers from trampling on each other. TDB is also
extremely small."
HOMEPAGE="http://tdb.samba.org/"
SRC_URI="http://www.samba.org/ftp/${NAME}/${NAME}-${VERSION}.tar.gz"
PATCH_URI="1.2.9-cygwin.patch"

PKG_NAMES="tdb libtdb1 libtdb-devel python39-tdb"
tdb_SUMMARY="${SUMMARY} utilities"
tdb_CONTENTS="usr/bin/tdb* usr/share/"
libtdb1_SUMMARY="${SUMMARY} library (runtime)"
libtdb1_CONTENTS="usr/bin/cygtdb-1.dll"
libtdb_devel_SUMMARY="${SUMMARY} library (development)"
libtdb_devel_CONTENTS="usr/include/ usr/lib/lib* usr/lib/pkgconfig/"
python39_tdb_CATEGORY="Python"
python39_tdb_SUMMARY="${SUMMARY} library (Python bindings)"
python39_tdb_CONTENTS="usr/lib/python3.9/site-packages/tdb.*"

src_compile() {
	lndirs
	cd ${B}
	./configure --prefix=/usr \
		--bundled-libraries=NONE --builtin-libraries=replace
	cygmake
}

src_install() {
	cd ${B}/bin/default
	# tdbtorture is a test program not meant to be installed
	dobin cygtdb-1.dll tdb{backup,dump,restore,tool}.exe
	dolib libtdb.dll.a
	doman man/*.8
	doinclude ${B}/include/*.h
	dopkgconfig tdb.pc
	dopython3 python/tdb.cpython-3*.dll
}

DOCS="docs/README"

  reply	other threads:[~2024-02-20 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 10:41 Takashi Yano
2024-02-20 14:54 ` Takashi Yano [this message]
2024-02-20 20:50   ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220235405.70b78774da0414a75a265329@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).