summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2012-08-27 11:19:38 +0000
committerespie <espie@openbsd.org>2012-08-27 11:19:38 +0000
commitfe34a30a5d504490db0c60e7e5bb7c66a4599ac0 (patch)
treec5ec35e79475654537b2ac197ac0726fa14733b1 /lib
parenta few libtool users are bogus, they confuse --export-symbols with the (diff)
downloadwireguard-openbsd-fe34a30a5d504490db0c60e7e5bb7c66a4599ac0.tar.xz
wireguard-openbsd-fe34a30a5d504490db0c60e7e5bb7c66a4599ac0.zip
let regen_headers also take care of sqlite3.pc.in => sqlite3.pc
"moui" landry@
Diffstat (limited to 'lib')
-rw-r--r--lib/libsqlite3/Makefile4
-rw-r--r--lib/libsqlite3/tsrc/header_regen22
2 files changed, 22 insertions, 4 deletions
diff --git a/lib/libsqlite3/Makefile b/lib/libsqlite3/Makefile
index 3a2e2978608..d95acef7eb7 100644
--- a/lib/libsqlite3/Makefile
+++ b/lib/libsqlite3/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2012/06/22 17:52:34 espie Exp $
+# $OpenBSD: Makefile,v 1.9 2012/08/27 11:19:38 espie Exp $
.include <bsd.own.mk>
@@ -105,7 +105,7 @@ includes:
.PHONY: header
header:
- cd ${.CURDIR} && perl tsrc/header_regen VERSION src/sqlite.h.in src/sqlite3.h
+ cd ${.CURDIR} && perl tsrc/header_regen VERSION src/sqlite.h.in src/sqlite3.h sqlite3.pc.in sqlite3.pc
.include <bsd.lib.mk>
diff --git a/lib/libsqlite3/tsrc/header_regen b/lib/libsqlite3/tsrc/header_regen
index 97663506067..6ded599e28c 100644
--- a/lib/libsqlite3/tsrc/header_regen
+++ b/lib/libsqlite3/tsrc/header_regen
@@ -3,10 +3,10 @@
use strict;
use warnings;
-@ARGV == 3 or
+@ARGV == 5 or
die "Usage: $0 version src dest\n";
-my ($vfname, $src, $dest) = @ARGV;
+my ($vfname, $src, $dest, $pcin, $pcdest) = @ARGV;
open(my $fh, '<', $vfname)
or die "Can't read $vfname: $!\n";
my $version = <$fh>;
@@ -39,3 +39,21 @@ while (<$in>) {
print "#include <stdint.h>\n";
}
}
+
+my $h = { prefix => '/usr',
+ exec_prefix => '${prefix}',
+ libdir => '${exec_prefix}/lib',
+ includedir => '${prefix}/include',
+ RELEASE => $version,
+ LIBS => '' };
+
+open(my $in2, '<', $pcin)
+ or die "Can't read $pcin: $!\n";
+
+open(my $out2, '>', $pcdest)
+ or die "Can't write to $pcdest: $!\n";
+select($out2);
+while(<$in2>) {
+ while (s/\@(.*?)\@/$h->{$1}/g) {}
+ print;
+}