This commit is contained in:
Darren L. Weber
2009-05-27 22:54:16 +00:00
parent d1d788efac
commit 4c5bd3ab19
49 changed files with 2344 additions and 0 deletions
+198
View File
@@ -0,0 +1,198 @@
# -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
name qt4-mac
version 4.4.3
categories aqua
platforms macosx
maintainers erickt clubjuggler@gmail.com openmaintainer
homepage http://www.trolltech.com/
description Qt Tool Kit (Native Aqua Version)
long_description This is Qt, TrollTech's C++ toolkit for writing cross-platform GUI applications. \
This version uses the native Aqua UI. For a X11 version, see qt4-x11.
master_sites ftp://ftp.trolltech.com/qt/source/ \
http://ftp.iasi.roedu.net/mirrors/ftp.trolltech.com/qt/source/ \
http://ftp.ntua.gr/pub/X11/Qt/qt/source/ \
http://wftp.tu-chemnitz.de/pub/Qt/qt/source/
distname qt-mac-opensource-src-${version}
checksums md5 766c02e23d2de1b19c9a25a68297b04e \
sha1 00cdf6df27a590565f557a7c02ba2edc634354d1 \
rmd160 7c39303f7aef6a369a16e787681b78d07c59fc76
depends_lib port:libmng port:libpng port:jpeg port:tiff
patchfiles patch-mac.conf.diff
# have to build with Apple gcc because of -fconstant-cfstrings
configure.compiler gcc-4.0
configure.cmd "CFLAGS=-isystem${prefix}/include CXXFLAGS=-isystem${prefix}/include ./configure"
configure.pre_args
# directory for .app and executable files
# Once installed, they should not be moved so they can find each other
# (e.g. assistant.app) and the examples directory
set bindir ${prefix}/libexec/${name}/bin
set frameworkdir ${prefix}/Library/Frameworks
# Can be removed once MacPorts 1.7.0 is released
if {![info exists applications_dir]} {
set applications_dir /Applications/MacPorts
}
# See
# http://doc.trolltech.com/qtopia4.3/buildsystem/over-configure-options-qt-1.html
# for options
configure.args \
-v \
-confirm-license \
-prefix '${prefix}' \
-bindir '${bindir}' \
-docdir '${prefix}/share/doc/${portname}' \
-datadir '${prefix}/share/${portname}' \
-headerdir '${prefix}/include/${portname}' \
-plugindir '${prefix}/lib/${portname}-plugins' \
-translationdir '${prefix}/share/${portname}/translations' \
-optimized-qmake -debug-and-release -shared -stl \
-no-openssl -largefile \
-system-libpng -system-libjpeg -system-libmng -system-libtiff \
-system-zlib -qt-gif \
-no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql \
-no-sql-sqlite -no-nis -no-cups \
-framework -libdir '${frameworkdir}' \
-make libs -make tools \
-I${worksrcpath}/include \
-L${worksrcpath}/lib -L${prefix}/lib
# Take care of this with the CXXFLAGS=-isystem${prefix}/include
# this puts the include at the end so that qt's include files are found first.
# -I${prefix}/include
# not made by default, anyway: -nomake demos -nomake examples
build.target first
use_parallel_build yes
destroot.destdir INSTALL_ROOT="${destroot}"
post-destroot {
xinstall -d -m 0755 ${destroot}${bindir}
xinstall -d -m 0755 ${destroot}${applications_dir}/Qt
xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${portname}
# create link in ${prefix}/bin to executable files in ${bindir}
foreach bin [glob -type f -directory ${destroot}${bindir} *] {
system "ln -s ${bindir}/[file tail ${bin}] ${destroot}${prefix}/bin"
}
# create link in ${applications_dir}/Qt to .app directories in ${bindir}
# create link in ${prefix}/bin to all *.app/Contents/MacOS/*
foreach app [glob -type d -directory ${destroot}${bindir} *.app] {
system "ln -s ${bindir}/[file tail ${app}] ${destroot}${applications_dir}/Qt"
foreach bin [glob -type f -directory ${app} Contents/MacOS/*] {
system "ln -s ${bindir}/[file tail ${app}]/Contents/MacOS/[file tail ${bin}] ${destroot}${prefix}/bin"
}
}
# fix id of plugins shared libraries
foreach dirFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins -type d -nocomplain *] {
set dir [file tail ${dirFull}]
foreach libFull [glob -directory ${destroot}${prefix}/lib/${portname}-plugins/${dir} -nocomplain *.dylib] {
set lib [file tail ${libFull}]
system "install_name_tool -id ${prefix}/lib/${portname}-plugins/${dir}/${lib} ${libFull}"
}
}
# Put pkgconfig directory in correct place (Fix Ticket #15353)
if { ![variant_isset noframework]} {
system "mv ${destroot}${frameworkdir}/pkgconfig ${destroot}/${prefix}/lib/"
}
# dweber: I find it useful to have these symlinks,
# but this is not stricly macports style because it
# creates files outside the ${destroot}${prefix}
# if {[variant_isset noframework]} {
#xinstall -d -m 0755 /Developer/Applications/Qt
#system "for d in ${prefix}/libexec/qt4-mac/bin/*; do sudo ln -s $d /Developer/Applications/Qt/`basename $d`; done"
#}
# install documentation
foreach doc {INSTALL LICENSE.GPL2 LICENSE.GPL3 OPENSOURCE-NOTICE.TXT README \
GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT} {
xinstall -c -m 644 ${worksrcpath}/$doc ${destroot}${prefix}/share/doc/${portname}
}
}
default_variants +docs +dbus
variant dbus description "Include DBus support" {
depends_lib-append port:dbus
configure.args-append -dbus-linked
}
variant noframework description "Do not build frameworks" {
configure.args-delete -framework -libdir '${frameworkdir}'
configure.args-append -no-framework
}
variant nis description "Include Network Information Service (NIS) support" {
configure.args-delete -no-nis
configure.args-append -nis
}
variant cups description "Include Common Unix Printing System (CUPS) support" {
configure.args-delete -no-cups
configure.args-append -cups
}
variant mysql4 conflicts mysql5 description "Include support for SQL via mysql4 driver" {
depends_lib-append lib:libmysqlclient.12:mysql4
configure.args-delete -no-sql-mysql
configure.args-append -qt-sql-mysql -plugin-sql-mysql \
-I${prefix}/include/mysql -L${prefix}/lib/mysql
}
variant mysql5 conflicts mysql4 description "Include support for SQL via mysql5 driver" {
depends_lib-append lib:libmysqlclient.15:mysql5
configure.args-delete -no-sql-mysql
configure.args-append -qt-sql-mysql -plugin-sql-mysql \
-I${prefix}/include/mysql5/mysql -L${prefix}/lib/mysql5/mysql
}
variant psql description "Include support for SQL via postgresql driver" {
depends_lib-append port:postgresql83
configure.args-delete -no-sql-psql
configure.args-append -qt-sql-psql -plugin-sql-psql \
-I${prefix}/include/postgresql83 -L${prefix}/lib/postgresql83
}
variant sqlite description "Include support for SQL via sqlite driver" {
configure.args-delete -no-sql-sqlite
configure.args-append -qt-sql-sqlite -plugin-sql-sqlite
}
variant ssl description "Include OpenSSL support" {
depends_lib-append port:openssl
configure.args-delete -no-openssl
configure.args-append -openssl
}
variant examples description "Build Qt examples" {
# configure.args-delete "-nomake examples"
configure.args-append -make examples -examplesdir ${prefix}/share/${portname}/examples
}
variant demos description "Build Qt demos" {
# configure.args-delete "-nomake demos"
configure.args-append -make demos -demosdir ${prefix}/share/${portname}/demos
}
variant docs description "Include Qt Documentation" {
configure.args-append -make docs
}
livecheck.check regex
livecheck.url http://trolltech.com/developer/downloads/qt/mac
livecheck.regex "The current version of Qt/Mac Open Source Edition is (4(?:\\.\\d+)*)"
@@ -0,0 +1,25 @@
Index: mkspecs/common/mac.conf
===================================================================
--- mkspecs/common/mac.conf (revision 814547)
+++ mkspecs/common/mac.conf (working copy)
@@ -5,6 +5,7 @@
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
+QMAKE_EXTENSION_PLUGIN = bundle
QMAKE_LIBDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
Index: mkspecs/common/mac-g++.conf
===================================================================
--- mkspecs/common/mac-g++.conf (revision 814547)
+++ mkspecs/common/mac-g++.conf (working copy)
@@ -55,7 +55,7 @@
QMAKE_LFLAGS_DEBUG +=
QMAKE_LFLAGS_APP +=
QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib
-QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_PLUGIN += -bundle -flat_namespace
QMAKE_LFLAGS_THREAD +=
QMAKE_LFLAGS_INCREMENTAL+= -undefined suppress -flat_namespace
QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE}
+69
View File
@@ -0,0 +1,69 @@
# -*- 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
# $Id$
PortSystem 1.0
name pgAdmin3
version 1.8.4
categories databases
maintainers jwa
description An administration program to PostgreSQL
long_description pgAdmin III is a powerful administration and development \
platform for the PostgreSQL database, free for any use. The \
application works on several platforms, e.g. GNU/Linux, FreeBSD, \
OS X and Windows 2000/XP. This port is for OS X.
platforms macosx
homepage http://www.pgadmin.org/
master_sites http://developer.pgadmin.org/ftp/release/v${version}/src/ \
http://www.postgresql.org/ftp/pgadmin3/release/v${version}/src/
distname pgadmin3-${version}
checksums \
md5 12fc6027f651788615a7fa1c6ddbcdb3 \
sha1 c3103792c678183c5a9081daac56ebf467d674ff \
rmd160 466fa7fbb734f9bc63fb2375da0c87fe3d47b7f1
depends_lib port:postgresql83 \
port:wxWidgets \
port:openssl \
port:libxml2 \
port:libxslt
configure.args-append \
--with-pgsql=${prefix}/lib/postgresql83 \
--with-wx=${prefix} \
--with-wx-version=2.8 \
--with-libxml2=${prefix} \
--with-libxslt=${prefix} \
--enable-appbundle
build.target all install
#destroot.violate_mtree yes
destroot {
xinstall -d -m 0755 ${destroot}/Applications/MacPorts
file copy ${worksrcpath}/${name}.app ${destroot}/Applications/MacPorts/${name}.app
}
variant with_postgresql82 conflicts with_postgresql83 \
description {support for PostgreSQL 8.2.x} {
depends_lib-delete port:postgresql83
depends_lib-delete --with-pgsql=${prefix}/lib/postgresql83
depends_lib-append port:postgresql82
configure.args-append --with-pgsql=${prefix}/lib/postgresql82
}
variant debug description {provide a debug build in case of difficulties} {
configure.args-append --enable-debug
}
livecheck.check regex
livecheck.url ${homepage}
livecheck.regex pgAdmin III v(1.\[0-9\]+.\[0-9\]+)
@@ -0,0 +1 @@
open location "file:///Library/PostgreSQL/8.3/pgAdmin3.app/Contents/SharedSupport/docs/en_US/index.html"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
do shell script "open -a \"/Applications/MacPorts/pgAdmin3.app\""
+2
View File
@@ -0,0 +1,2 @@
set retval to do shell script "su - postgres -c \"/opt/local/lib/postgresql83/bin/pg_ctl -D /opt/local/var/db/postgresql83/defaultdb reload\"" with administrator privileges
display dialog retval buttons {"OK"} with icon 1 default button 1
+2
View File
@@ -0,0 +1,2 @@
set retval to do shell script "SystemStarter restart postgresql-8.3" with administrator privileges
display dialog retval buttons {"OK"} with icon 1 default button 1
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
# PostgreSQL psql runner script for OS X
# Dave Page, EnterpriseDB
# Check the command line
if [ $# -ne 0 -a $# -ne 1 ];
then
echo "Usage: $0 [wait]"
exit 127
fi
echo -n "Server [localhost]: "
read SERVER
if [ "$SERVER" = "" ];
then
SERVER="localhost"
fi
echo -n "Database [postgres]: "
read DATABASE
if [ "$DATABASE" = "" ];
then
DATABASE="postgres"
fi
echo -n "Port [5432]: "
read PORT
if [ "$PORT" = "" ];
then
PORT="5432"
fi
echo -n "Username [postgres]: "
read USERNAME
if [ "$USERNAME" = "" ];
then
USERNAME="postgres"
fi
psql -h $SERVER -p $PORT -U $USERNAME $DATABASE
RET=$?
if [ "$RET" != "0" ];
then
echo
echo -n "Press <return> to continue..."
read dummy
fi
exit $RET
+2
View File
@@ -0,0 +1,2 @@
set retval to do shell script "SystemStarter start postgresql-8.3" with administrator privileges
display dialog retval buttons {"OK"} with icon 1 default button 1
+2
View File
@@ -0,0 +1,2 @@
set retval to do shell script "SystemStarter stop postgresql-8.3" with administrator privileges
display dialog retval buttons {"OK"} with icon 1 default button 1
+95
View File
@@ -0,0 +1,95 @@
# -*- 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
# $Id$
PortSystem 1.0
name pgbash
version 7.3
categories databases devel
maintainers gmail.com:darren.weber.lists
description Pgbash is a BASH shell with PostgreSQL functionality.
long_description \
Pgbash is a BASH shell that includes the functionality for accessing PostgreSQL. It is possible to execute SQL in a shell script for batch processing, and execute SQL directly in an interactive bash environment. Also, pgbash has convenient functionality for creating simple web applications.
homepage http://www.psn.co.jp/PostgreSQL/pgbash/index-e.html
master_sites \
http://www.psn.co.jp/PostgreSQL/pgbash/ \
ftp://www.psn.co.jp/pub/PostgreSQL/pgbash/ \
ftp://ftp.gnu.org/gnu/bash/
distfiles \
pgbash-7.3.tar.gz \
bash-2.05a.tar.gz
checksums \
pgbash-7.3.tar.gz \
md5 e3e33423208a5a538708dc92001abf67 \
sha1 730a4879bc74e03de78445b94aad94efda75c033 \
rmd160 0658dcbb5db8d492fb041c58ac29c623f18a2d06 \
bash-2.05a.tar.gz \
md5 eeabc3f624861c4a8a687f7701db3d06 \
sha1 1a74a4a4e4f771484cbf22786689fe33ab6d36d3 \
rmd160 136302f57bf56668f042938de8de0174d51ddbf9
# build dependencies (noted on the download web site)
#> gcc -v
#gcc version 2.7.2.1
#> bison --version
#GNU Bison version 1.25
#> flex --version
#flex version 2.5.4
#
#The version of each tool is O.K., if it is new or same as the
#version shown above. (I think that it is O.K. if it is compiled normally,
#even if the tool is older than the above-mentioned.)
platforms darwin
depends_build port:bison \
port:flex \
port:gmake
depends_lib port:postgresql83
# maybe it should depend on postgresql7; this source package was last
# updated in 2003!
#
# running my test build in /usr/src/pgbash-7.3/src/bash-2.05a
#
post-extract {
system "mv ${worksrcpath}/bash-2.05a ${worksrcpath}/pgbash-7.3/src/"
system "cd ${worksrcpath}/pgbash-7.3/src/bash-2.05a-patch/ && make"
worksrcpath="${worksrcpath}/pgbash-7.3/src/bash-2.05a/"
}
configure.env-append \
PG_CONFIG=${prefix}/lib/postgresql83/bin/pg_config
configure.args-append \
--pginc-prefix=${prefix}/include/postgresql83 \
--pglib-prefix=${prefix}/lib/postgresql83
# How to change into postgres super user and modify destroot phase?
#Please execute 'make install' as a postgres super user. 'make install'
#copies Pgbash to /usr/local/bin directory and copies Pgbashrc to /etc
#directory.
#
#pgbash-7.3/src/bash-2.05a/pgbash ==> /usr/local/bin/pgbash
#pgbash-7.3/rc/pgbashrc ==> /etc/pgbashrc
#
#If you can not work as a postgres super user, please copy Pgbash to a
#suitable directory directory and copy Pgbash to the home directory.
#
#cp pgbash-7.3/src/bash-2.05a/pgbash ~/pgbash
#cp pgbash-7.3/rc/pgbashrc ~/.pgbashrc
Binary file not shown.
+46
View File
@@ -0,0 +1,46 @@
# -*- 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
# $Id$
PortSystem 1.0
name postgresql83-doc
version 8.3.4
categories databases
platforms darwin
maintainers mww jwa
description Documentation for the postgresql database
long_description PostgreSQL is Object-Relational Database Management System. \
It supports almost all SQL constructs, including transactions, \
subselects, and user-defined types and functions. Write-ahead \
logging means increased performance while retaining data \
integrity. This is the documentation.
homepage http://www.postgresql.org/
master_sites postgresql:source/v${version}
distname postgresql-${version}
checksums md5 c339b9d3c0c4add64c7a76640fc93744 \
sha1 3e6fd905fd3fe9698b50e5376ed15b7d6e3bb602 \
rmd160 13cb20672b0dc6fe52346d7c906a0842e0c872ac
use_bzip2 yes
dist_subdir postgresql83
set libdir ${prefix}/lib/postgresql83
configure.args --mandir=${prefix}/share/man \
--with-docdir=${prefix}/share/doc/postgresql83 \
--without-openssl \
--without-rendezvous \
--without-readline \
--without-zlib
build.dir ${worksrcpath}/doc
build.type gnu
build.target
destroot.dir ${build.dir}
livecheck.check regex
livecheck.url ${homepage}/versions.rss
livecheck.regex (8.3.\[0-9\]+)
+129
View File
@@ -0,0 +1,129 @@
# -*- 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
# $Id$
PortSystem 1.0
set server postgresql83
name ${server}-server
version 8.3.4
categories databases
platforms darwin
maintainers mww jwa
description Run ${server} as a server
long_description Run ${server} as a server (with SSL connections).
homepage http://www.postgresql.org/
master_sites postgresql
livecheck.check regex
livecheck.url ${homepage}/versions.rss
livecheck.regex (8.3.\[0-9\]+)
depends_run port:${server} \
port:openssl
fetch {}
checksum {}
extract {}
use_configure no
build {}
set libdir ${prefix}/lib/${server}
set logdir ${prefix}/var/log/${server}
# Is it possible to prompt for a user defined database path?
set dbdir ${prefix}/var/db/${server}/defaultdb
set dbpid ${dbdir}/postmaster.pid
set dbuser postgres
set dbgrp postgres
startupitem.create yes
startupitem.name ${name}
startupitem.logfile ${logdir}/postgres.log
startupitem.logevents yes
startupitem.init "PGCTL=${libdir}/bin/pg_ctl"
# Options passed through to postmaster via 'pg_ctl -o'
# -i enable TCP/IP connections
# -l enable SSL connections
startupitem.start \
"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL83DATA:=${dbdir}} start -w -l ${logdir}/postgres.log -o \\\"-i -l\\\"\""
startupitem.stop \
"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL83DATA:=${dbdir}} stop -s -m fast\""
startupitem.restart \
"su ${dbuser} -c \"\${PGCTL} -D \${POSTGRESQL83DATA:=${dbdir}} restart -w -s -m fast\""
startupitem.pidfile clean ${dbpid}
destroot {
# Check if the user and group already exist and replace them?
addgroup ${dbgrp}
set gid [existsgroup ${dbgrp}]
adduser ${dbuser} shell=/bin/sh gid=${gid} \
home=${prefix}/var/db/${server} \
realname=PostgreSQL\ Server
xinstall -m 755 -d ${destroot}${logdir}
system "touch ${destroot}${logdir}/postgres.log"
system "chown -R ${dbuser}:${dbgrp} ${destroot}${logdir}"
}
post-install {
ui_msg "
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To create a database instance, after install do
% %% sudo mkdir -p ${dbdir}
% %% sudo chown ${dbuser}:${dbgrp} ${dbdir}
% %% sudo su ${dbuser} -c \'${libdir}/bin/initdb -D ${dbdir}\'
% (You can replace ${dbdir} with any path of your choice, but
% you must then modify the startup management scripts in
% ${prefix}/etc/LaunchDaemons/org.macports.${name}/.
% These scripts over-ride the PGDATA environment variable.)
%
% This server will accept SSL connections, which must be
% enabled by a server certificate in your data directory. This
% server will NOT start without an SSL certificate and it is not
% possible to provide a generic certificate automatically. For more
% information, see http://developer.postgresql.org/pgdocs/postgres/ssl-tcp.html
% To create a self-signed certificate:
% $ sudo -i
% # cd ${dbdir}
% # openssl req -new -text -out server.req
% Fill out the information that openssl asks for. The program will
% generate a key that is passphrase protected; enter any passphrase at
% the prompt for a PEM passphrase (it will be removed from the key later).
% When prompted for a \"Common Name\", make sure you enter the local
% host name. The challenge password can be left blank. Now, to remove
% the PEM passphrase (for automatic startup of the server), run:
% # openssl rsa -in privkey.pem -out server.key
% # rm privkey.pem
% Enter the old passphrase to unlock the existing key. Now do:
% # openssl req -x509 -in server.req -text -key server.key -out server.crt
% # chmod og-rwx server.key
% # chown ${dbuser}:${dbgrp} server.*
% That's it. A self-signed certificate can be used for testing, but a
% certificate signed by a certificate authority (CA; either a global CA
% or a local one) should be used in production, so a client can verify
% the server's identity.
%
% To load the startup deamon, run:
% $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.${name}.plist
% To unload the startup deamon, run:
% $ sudo launchctl unload -w /Library/LaunchDaemons/org.macports.${name}.plist
%
% Run 'port install pgAdmin3' to administer PostgreSQL
% Run 'port install slony1' to manage replication for PostgreSQL
%
% To tweak your DBMS, consider increasing kern.sysv.shmmax
% by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf
%
% Please read the documentation for the complete list of run-time
% configuration settings and how to set them on the command line or in
% the configuration file. The server config can be found in:
%
% The server log can be found in:
% ${prefix}/var/log/${server}/postgres.log
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n"
}

Some files were not shown because too many files have changed in this diff Show More