1 | # -*- 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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name sqlite3 |
---|
6 | version 3.17.0 |
---|
7 | categories databases |
---|
8 | platforms darwin |
---|
9 | license public-domain |
---|
10 | |
---|
11 | maintainers {mps @Schamschula} openmaintainer |
---|
12 | |
---|
13 | description an embedded SQL database engine |
---|
14 | |
---|
15 | long_description SQLite3 is an SQL database engine in a C library. \ |
---|
16 | Programs that link the SQLite3 library can have SQL \ |
---|
17 | database access without running a separate RDBMS \ |
---|
18 | process. The distribution comes with a standalone \ |
---|
19 | command-line access program (sqlite3) that can be used \ |
---|
20 | to administer an SQLite3 database and which serves as \ |
---|
21 | an example of how to use the SQLite3 library. |
---|
22 | |
---|
23 | homepage http://www.sqlite.org/ |
---|
24 | master_sites ${homepage}2017 |
---|
25 | |
---|
26 | set padded_ver [string range [subst [regsub -all {\.([0-9]+)} "${version}.0.0" {[format %02d \1]}]] 0 6] |
---|
27 | distname sqlite-autoconf-${padded_ver} |
---|
28 | |
---|
29 | checksums rmd160 c198f8c3f91894ba017b7e71a9d6e5c31a9ef12c \ |
---|
30 | sha256 a4e485ad3a16e054765baf6371826b5000beed07e626510896069c0bf013874c |
---|
31 | |
---|
32 | depends_lib port:libedit \ |
---|
33 | port:ncurses |
---|
34 | |
---|
35 | patchfiles patch-sqlite3.c.diff |
---|
36 | |
---|
37 | configure.args --enable-threadsafe \ |
---|
38 | --enable-dynamic-extensions \ |
---|
39 | --disable-readline \ |
---|
40 | --enable-editline \ |
---|
41 | AWK=/usr/bin/awk |
---|
42 | |
---|
43 | # search in worksrcpath for sqlite3.h first -- dont pick up an installed one! |
---|
44 | configure.cppflags-prepend -DSQLITE_ENABLE_COLUMN_METADATA \ |
---|
45 | -DSQLITE_ENABLE_FTS3_PARENTHESIS \ |
---|
46 | -DSQLITE_ENABLE_FTS4 \ |
---|
47 | -DSQLITE_ENABLE_FTS5 \ |
---|
48 | -DSQLITE_ENABLE_RTREE \ |
---|
49 | -DSQLITE_SECURE_DELETE \ |
---|
50 | -DSQLITE_ENABLE_STAT4 \ |
---|
51 | -DSQLITE_ENABLE_UNLOCK_NOTIFY \ |
---|
52 | -DSQLITE_SOUNDEX \ |
---|
53 | -I${worksrcpath} |
---|
54 | |
---|
55 | build.type gnu |
---|
56 | |
---|
57 | livecheck.type regex |
---|
58 | livecheck.url http://www.sqlite.org/news.html |
---|
59 | livecheck.regex (3(?:\\.\[0-9\]+)+) |
---|
60 | |
---|
61 | post-destroot { |
---|
62 | if {${subport} eq ${name}} { |
---|
63 | xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1 |
---|
64 | } |
---|
65 | } |
---|
66 | |
---|
67 | platform darwin 8 { |
---|
68 | configure.cppflags-append -DSQLITE_WITHOUT_ZONEMALLOC |
---|
69 | } |
---|
70 | |
---|
71 | subport ${name}-tools { |
---|
72 | distname sqlite-src-${padded_ver} |
---|
73 | description A bundle of command-line tools for managing SQLite \ |
---|
74 | database files |
---|
75 | |
---|
76 | long_description A bundle of command-line tools for managing SQLite \ |
---|
77 | database files, including the sqldiff program and the \ |
---|
78 | sqlite3_analyzer program. |
---|
79 | |
---|
80 | checksums rmd160 1c0930021811f401c33b42ad93bbf3dd6174a6c4 \ |
---|
81 | sha256 86754bee6bcaf1f2a6bf4a02676eb3a43d22d4e5d8339e217424cb2be6b748c3 |
---|
82 | use_zip yes |
---|
83 | depends_lib port:tcl |
---|
84 | configure.args --with-tcl=${prefix}/lib |
---|
85 | build.target sqldiff sqlite3_analyzer |
---|
86 | destroot { |
---|
87 | xinstall -m 755 ${worksrcpath}/sqldiff ${destroot}${prefix}/bin |
---|
88 | xinstall -m 755 ${worksrcpath}/sqlite3_analyzer ${destroot}${prefix}/bin |
---|
89 | } |
---|
90 | pre-activate { |
---|
91 | # tcl previously conflicted because it installed files now provided by sqlite3-tools |
---|
92 | if {![catch {set installed [lindex [registry_active tcl] 0]}]} { |
---|
93 | set _version [lindex $installed 1] |
---|
94 | set _revision [lindex $installed 2] |
---|
95 | set _cmp866 [vercmp $_version 8.6.6] |
---|
96 | if {($_cmp866 < 0) || ($_cmp866 == 0 && $_revision < 1)} { |
---|
97 | # tcl used to install some files now provided by sqlite3-tools in versions < 8.6.6_1 |
---|
98 | registry_deactivate_composite tcl "" [list ports_nodepcheck 1] |
---|
99 | } |
---|
100 | } |
---|
101 | } |
---|
102 | } |
---|