[121866] trunk/dports/genealogy/gramps

devans at macports.org devans at macports.org
Wed Jul 9 13:00:48 PDT 2014


Revision: 121866
          https://trac.macports.org/changeset/121866
Author:   devans at macports.org
Date:     2014-07-09 13:00:48 -0700 (Wed, 09 Jul 2014)
Log Message:
-----------
gramps: update to version 4.0.3 using python PortGroup, now supports gtk3 and both python 2 and 3.

Modified Paths:
--------------
    trunk/dports/genealogy/gramps/Portfile

Added Paths:
-----------
    trunk/dports/genealogy/gramps/files/patch-gramps-gen-utils-resourcepath.py.diff

Removed Paths:
-------------
    trunk/dports/genealogy/gramps/files/patch-configure.diff

Modified: trunk/dports/genealogy/gramps/Portfile
===================================================================
--- trunk/dports/genealogy/gramps/Portfile	2014-07-09 18:47:46 UTC (rev 121865)
+++ trunk/dports/genealogy/gramps/Portfile	2014-07-09 20:00:48 UTC (rev 121866)
@@ -4,7 +4,11 @@
 PortSystem              1.0
 
 name                    gramps
-version                 3.4.8
+conflicts               gramps3
+
+PortGroup               python 1.0
+
+version                 4.0.3
 license                 GPL-2
 categories              genealogy python
 platforms               darwin
@@ -16,68 +20,80 @@
 long_description        GRAMPS is a genealogy program to store, edit, \
                         and research genealogical data.  It provides \
                         advanced capabilities for research, analysis, and \
-                        correlation to potentially fill relationship gaps.
+                        correlation to potentially fill relationship gaps. This \
+                        version is based on gtk3 and supports both python 2 and 3. \
+                        To use the legacy gtk2 version, install port gramps3.
 
 homepage                http://www.gramps-project.org/
 master_sites            sourceforge:gramps
 
-checksums               rmd160  b7928b50962ecb4a5895e072a7fab52d76718faa \
-                        sha256  fea75da181c489ce2d61de6ada14b71cec21169f46265b9f22b59a6bab441002
+checksums               rmd160  f03a316a0749a3a589edbda95e786a15b21b342c \
+                        sha256  13985235d27332af461311399a90a5280a7aa516d08bcb4979d3d9edc9c7d7bf
 
-depends_build           port:pkgconfig \
-                        port:intltool \
-                        port:gnome-doc-utils
+depends_build-append    port:intltool
 
-# librsvg is required at least for icons in dialogs
-
-depends_lib             port:librsvg \
-                        port:aspell-dict-en \
+depends_lib-append      port:desktop-file-utils \
                         port:shared-mime-info \
-                        port:desktop-file-utils \
-                        path:bin/dot:graphviz
+                        port:xdg-utils \
+                        port:gtk3 \
+                        port:gtkspell3 \
+                        port:osm-gps-map \
+                        port:gexiv2 \
+                        path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3 \
+                        path:bin/dot:graphviz \
+                        port:ghostscript \
+                        port:goocanvas2
 
-patchfiles              patch-configure.diff
+patchfiles              patch-gramps-gen-utils-resourcepath.py.diff
 
-# update intltool.m4 and autoreconf
-
-post-patch {
-    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
+platform darwin {
+    if {${configure.cxx_stdlib} eq "libstdc++"} {
+       depends_lib-delete path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3
+       depends_lib-append path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3-2.0
+    }
 }
 
-use_autoreconf          yes
-autoreconf.args         -fvi
+#
+# supports python27 and python3 >= 3.2
+# python 3 versions require py-bsddb3 for database access, not yet tested with python34
+#
 
-configure.args          --disable-mime-install
+variant python27 conflicts python32 python33 description {Use Python 2.7} {
+    python.default_version  27
+    depends_lib-append  port:py27-gobject3 \
+                        port:py27-pyicu \
+                        port:py27-Pillow
+}
 
-variant python26 conflicts python27 description {Use python 2.6} {
-    depends_lib-append  port:py26-gtkspell \
-                        port:py26-enchant \
-                        port:py26-webkitgtk \
-                        port:py26-osmgpsmap \
-                        port:py26-exiv2 \
-                        port:py26-pil \
-                        port:py26-pyicu
-    configure.python    ${prefix}/bin/python2.6
+variant python32 conflicts python27 python33 description {Use Python 3.2} {
+    python.default_version  32
+    depends_lib-append  port:py32-gobject3 \
+                        port:py32-pyicu \
+                        port:py32-Pillow \
+                        port:py32-bsddb3
 }
 
-variant python27 conflicts python26 description {Use python 2.7} {
-    depends_lib-append  port:py27-gtkspell \
-                        port:py27-enchant \
-                        port:py27-webkitgtk \
-                        port:py27-osmgpsmap \
-                        port:py27-exiv2 \
-                        port:py27-pil \
-                        port:py27-pyicu
-    configure.python    ${prefix}/bin/python2.7
+variant python33 conflicts python27 python32 description {Use Python 3.3} {
+    python.default_version  33
+    depends_lib-append  port:py33-gobject3 \
+                        port:py33-pyicu \
+                        port:py33-Pillow \
+                        port:py33-bsddb3
 }
 
-if {![variant_isset python26]} {
+if {![variant_isset python32] && ![variant_isset python33]} {
     default_variants +python27
 }
 
+post-destroot {
+    reinplace "s|${destroot}${python.prefix}|${prefix}|" ${destroot}${python.pkgd}/gramps/gen/utils/resource-path
+    delete ${destroot}${prefix}/share
+    move ${destroot}${python.prefix}/share ${destroot}${prefix}
+}
+
 post-activate {
+    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
     system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
-    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
 }
 
 notes {
@@ -96,6 +112,16 @@
 Also, use XML format for any data migration. Moving to another machine, sending data to a family member,
 copying to another user on the same machine -- all of these cases should use XML.
 
+***** IMPORTANT *****
+
+Beginning with GRAMPS 4.0, GRAMPS supports either python2 or python3.  If you plan to use python3, please MAKE A BACKUP
+of your data using your old python2 version before attempting to load your family tree in GRAMPS 4.0 with python3.  The python3
+versions use a different database interface with a new database format that is not compatible with the python2 versions. On startup,
+GRAMPS 4.0 python3 will ask you if you want to reformat your database.  Once this has been done, your database will no longer be usable
+with python2 versions.
+
+***** MAKE A BACKUP! *****
+
 For detailed backup instructions, see the online GRAMPS documentation at http://www.gramps-project.org/wiki/index.php?title=How_to_make_a_backup
 
 }

Deleted: trunk/dports/genealogy/gramps/files/patch-configure.diff
===================================================================
--- trunk/dports/genealogy/gramps/files/patch-configure.diff	2014-07-09 18:47:46 UTC (rev 121865)
+++ trunk/dports/genealogy/gramps/files/patch-configure.diff	2014-07-09 20:00:48 UTC (rev 121866)
@@ -1,14 +0,0 @@
---- configure.orig	2012-08-23 12:02:19.000000000 -0700
-+++ configure	2012-09-17 08:34:25.000000000 -0700
-@@ -5600,9 +5600,9 @@
- 
- 
- 
--  PYTHON_PREFIX='${prefix}'
-+  PYTHON_PREFIX=`$PYTHON -c 'import sys; print sys.prefix;'`
- 
--  PYTHON_EXEC_PREFIX='${exec_prefix}'
-+  PYTHON_EXEC_PREFIX=`$PYTHON -c 'import sys; print sys.exec_prefix;'`
- 
- 
- 

Added: trunk/dports/genealogy/gramps/files/patch-gramps-gen-utils-resourcepath.py.diff
===================================================================
--- trunk/dports/genealogy/gramps/files/patch-gramps-gen-utils-resourcepath.py.diff	                        (rev 0)
+++ trunk/dports/genealogy/gramps/files/patch-gramps-gen-utils-resourcepath.py.diff	2014-07-09 20:00:48 UTC (rev 121866)
@@ -0,0 +1,11 @@
+--- gramps/gen/utils/resourcepath.py.orig	2013-10-05 00:29:32.000000000 -0700
++++ gramps/gen/utils/resourcepath.py	2013-10-05 00:30:14.000000000 -0700
+@@ -66,7 +66,7 @@
+             try:
+                 with io.open(resource_file, encoding='utf-8',
+                                 errors='strict') as fp:
+-                    resource_path = fp.readline()
++                    resource_path = fp.readline().rstrip('\n')
+             except UnicodeError as err:
+                 LOG.exception("Encoding error while parsing resource path", err)
+                 sys.exit(1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140709/89c2f3f2/attachment.html>


More information about the macports-changes mailing list