/
Portfile
140 lines (110 loc) · 5.09 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup clang_dependency 1.0
name sqlite3
# don't forget to update the checksums for sqlite3-tools when updating sqlite3
version 3.45.3
revision 0
categories databases
license public-domain
maintainers {mps @Schamschula} openmaintainer
description an embedded SQL database engine
long_description SQLite3 is an SQL database engine in a C library. \
Programs that link the SQLite3 library can have SQL \
database access without running a separate RDBMS \
process. The distribution comes with a standalone \
command-line access program (sqlite3) that can be used \
to administer an SQLite3 database and which serves as \
an example of how to use the SQLite3 library.
homepage https://www.sqlite.org/
master_sites ${homepage}2024
set padded_ver [string range [subst [regsub -all {\.([0-9]+)} "${version}.0.0" {[format %02d \1]}]] 0 6]
distname sqlite-autoconf-${padded_ver}
checksums rmd160 1209a51bafa4f2ba3442461f681f3e424b172264 \
sha256 b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531 \
size 3235957
depends_lib port:libedit \
port:ncurses \
port:zlib
if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} {
# This port is in the dependency chain for clang 3.7 and later
clang_dependency.extra_versions 3.7
}
# Drop defines-ppc patches with 3.46.0: https://sqlite.org/forum/forumpost/fc4bfa307db74d04
if {${subport} ne "${name}-tools"} {
configure.checks.implicit_function_declaration.whitelist-append strchr
patchfiles patch-sqlite3_fix-atomic-clang-4.diff \
patch-sqlite3_fix-defines-ppc.diff
} else {
patchfiles patch-sqlite3-tools_fix-atomic-clang-4.diff \
patch-sqlite3-tools_fix-defines-ppc.diff
}
configure.args --enable-threadsafe \
--enable-dynamic-extensions \
--disable-readline \
--enable-editline \
AWK=/usr/bin/awk
build.type gnu
livecheck.type regex
livecheck.url https://www.sqlite.org/news.html
livecheck.regex (3(?:\\.\[0-9\]+)+)
platform darwin 8 {
# See http://trac.macports.org/ticket/32930 for why this is needed.
configure.cppflags-append -DSQLITE_WITHOUT_ZONEMALLOC
}
if {${subport} eq ${name}} {
post-patch {
reinplace "s|-ltinfo||" ${worksrcpath}/configure
}
# search in worksrcpath for sqlite3.h first -- don't pick up an installed one!
configure.cppflags-prepend -DSQLITE_DISABLE_INTRINSIC \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_STAT4 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_SOUNDEX \
-I${worksrcpath}
post-destroot {
xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
}
}
subport ${name}-tcl {
depends_lib port:tcl
configure.dir ${worksrcpath}/tea
build.dir ${configure.dir}
configure.args --exec-prefix=${prefix} \
--with-tcl=${prefix}/lib \
--with-tclinclude=${prefix}/include
configure.cppflags-prepend -I${worksrcpath}
platform darwin {
if {${os.major} < 11} {
patch.dir ${configure.dir}
patchfiles patch-tea-configure.diff
}
}
}
subport ${name}-tools {
revision 0
distname sqlite-src-${padded_ver}
description A bundle of command-line tools for managing SQLite \
database files
long_description {*}${description}, including the sqldiff program and the \
sqlite3_analyzer program.
checksums rmd160 35f72b4040df5a7a94642320d5c6eacf3a5508e5 \
sha256 ec0c959e42cb5f1804135d0555f8ea32be6ff2048eb181bccd367c8f53f185d1 \
size 14160555
use_zip yes
depends_lib port:tcl \
port:zlib
configure.args --with-tcl=${prefix}/lib
build.target sqldiff sqlite3_analyzer
destroot {
xinstall -m 755 ${worksrcpath}/sqldiff ${destroot}${prefix}/bin
xinstall -m 755 ${worksrcpath}/sqlite3_analyzer ${destroot}${prefix}/bin
}
}