diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-scheme/gauche-gtk |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-scheme/gauche-gtk')
-rw-r--r-- | dev-scheme/gauche-gtk/Manifest | 8 | ||||
-rw-r--r-- | dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff | 71 | ||||
-rw-r--r-- | dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff | 11 | ||||
-rw-r--r-- | dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff | 23 | ||||
-rw-r--r-- | dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild | 80 | ||||
-rw-r--r-- | dev-scheme/gauche-gtk/metadata.xml | 16 |
6 files changed, 209 insertions, 0 deletions
diff --git a/dev-scheme/gauche-gtk/Manifest b/dev-scheme/gauche-gtk/Manifest new file mode 100644 index 000000000000..b32a85de0dc6 --- /dev/null +++ b/dev-scheme/gauche-gtk/Manifest @@ -0,0 +1,8 @@ +AUX gauche-gtk-gtk-lib.hints.diff 3208 SHA256 676485bb19b4e5fb5e2b0f2b9e61ec3179f158287e334d3d853fd97c668c2666 SHA512 4315e517d52f39cd8d19e6abadc244c4c23c059e7adc137e247b5b1926d09d6d924b8fc1bc376add58a42ec365da0024a19d1a4d9ac709bf8b1dca86663da747 WHIRLPOOL e539071de31deaf01361def5b4b35d5585e70730b5f952ed2a86cd9c1fc2f0f0494344b5c496670a7a8e12774d00e82f53912e4187d2124884ece0326225a977 +AUX gauche-gtk-h2s-cpp.diff 472 SHA256 c38734dc72a138bf4ebe0b1d2b2a03b49a5da2d265711d7eacd50d2358a99520 SHA512 9615dc4586873424379da75874d50c14459afbfbe37c186a8ad592fad7153ca2e2bc48f8320ffc91e8c86f9c7a34ae0ed96544cab43d6ca80a29a176501e8862 WHIRLPOOL 69084c8c38c93df82d8fece1cb92ca935b040a1184d385ed08ae51d8a8dda0ca16e60614fb4f148389eabf7758f484c444a6701937046a04d24117bc0cb6afa6 +AUX gauche-gtk-h2s-gdk-pixbuf.diff 778 SHA256 78140ec1836e0d8d473eecd96e1de38f905e63483c19860fc835a2ea95f1523a SHA512 a2ab9c550fcde6ae46b086210062dfb8504aafff398258da01dea9f0c8488e58ce1644a74f8b5414e4aa05e475be0ef5a69131482caf04626511d4c9e4a0df98 WHIRLPOOL 105af89f91919e58a35a21df99998e0392edb3f767695a09a8fa8b029be286f5ce7a562476b8be94beb675665c6a50266929c9e9675a39d5dc9bd1e313bb5fcb +DIST Gauche-gtk-0.6_pre1.tar.gz 203261 SHA256 cfe38221217519d3e6fe9bca6168938abe4801ec1a79a73f2f1b441cdc47dc0b SHA512 150d9169f893ab4ca80956aab93523cf8d9a5e831f7ba4f577314fa6fac72910238cbb5f375fa6b265b3b6a013bba2674c37c8219c391dd212d52267e2360bb3 WHIRLPOOL ae8c9b9673a1e774a30a1dac8437a9bb961472e913bab8a894d8465554319a2ce229e164c10ad4d9b2bca38cbff8550b8d53ab48c5353aee7a9145d4aa3f73df +EBUILD gauche-gtk-0.6_pre1.ebuild 1537 SHA256 a8685833b8149be8db55735cd41fd7d0dced1031a9718155b0e0d677b8512e3c SHA512 b1796a2ca03301c9245a6c82d87c0413db43831d1e48ca6e304e384bf307821030f7a1129536fb6aba74e6254a3f1708ff55cef458d6ea69953c278c12b16925 WHIRLPOOL 78c58fa917c864cbfae01b3bded77cec527df940f32faf6181d1b41c2660b0182b2ffe474f1cce98c508248877f323cdc1f4a64163d1e8e4e7479b50f5c12702 +MISC ChangeLog 2575 SHA256 08268585ca4ba282485dd3826f8ebf915855ff9f4bea79354eb195b016b82408 SHA512 7e3f6a98fae283fbb8b6447032518ac92987d738e45551b9ca19b9bc04c6956634d016b52f4d9c0fab60acbd78ac983397ca318b8ac175b2aab6e7a02a5224e2 WHIRLPOOL a1720aaef7479e4eea040955cddeeeea0074f45cf11b7ac0eeeb9d5b1cb2a2c66079918a351655b1b1909f30654f98edbfbb0998bdc68dcd4d835495325b9502 +MISC ChangeLog-2015 3907 SHA256 646606d69e83f00898056d4382cc878aa539d0ce59d72a8dcd9d3eba2978aaa5 SHA512 98cf4d9e15ccd83034103eea42bacc326fde08e42984d2114084b750a4532e20a8718b907b77a630b188758a2b2c09f7b761931bc2aaf039fa5ce4aef3661d04 WHIRLPOOL 289910f0d0e9132956c87ba684cbfa525fa19df6b2fc6cc91baa4215ef49273cad2e847f2794e1fe676603f7580dfb6cf02b22dfbdff175e5ad6875a8855463c +MISC metadata.xml 443 SHA256 64134b442243a6aeb198246243e618e0ad8b0b5599d45de9750b8e46425d842f SHA512 35ef6cf09aa65271ebfc5edadde2f784724f8b6ca8ba3f24dc738bf58e33641474fedd8239f988bb853b9889a16066d443679f0cef6a6d701c19c8c9666f17ed WHIRLPOOL b6674f8b5aece29dbcc7fe1c5e09047bf6655ec602c285e8a6964a8b688d336c86f27b503b282bb3c68719c1d320179981b1cbf74ac2e1763bd530e763002614 diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff new file mode 100644 index 000000000000..be54ee550ba7 --- /dev/null +++ b/dev-scheme/gauche-gtk/files/gauche-gtk-gtk-lib.hints.diff @@ -0,0 +1,71 @@ +--- a/src/gtk-lib.hints ++++ b/src/gtk-lib.hints +@@ -527,8 +527,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" + (add-mixin! "Scm_GtkEditableClass" "Scm_GtkCellEditableClass")) + + ;; we can't free the return value of gtk_entry_get_text. +-(define-cproc gtk-entry-get-text (entry::<gtk-entry>) +- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));") ++(define-cproc-fix gtk-entry-get-text ++ (fix-arguments! '(entry::<gtk-entry>)) ++ (fix-body! ++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_entry_get_text(entry)));")) + + ;;================================================================== + ;; gtkfilesel.h +@@ -539,8 +541,10 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" + ;; gtk_file_selection_get_filename returns mbstr encoded by the current + ;; locale. We canonicalize it to utf8. The Scheme glue code converts + ;; it to Gauche's internal encoding. +-(define-cproc gtk-file-selection-get-filename (sel::<gtk-file-selection>) +- "const gchar *fn_mb = gtk_file_selection_get_filename(sel); ++(define-cproc-fix gtk-file-selection-get-filename ++ (fix-arguments! '(sel::<gtk-file-selection>)) ++ (fix-body! ++ "const gchar *fn_mb = gtk_file_selection_get_filename(sel); + gchar *fn_utf8 = g_filename_to_utf8(fn_mb, -1, NULL, NULL, NULL); + if (fn_utf8 == NULL) { + Scm_Error(\"got a filename including multibyte chars which can't be converted to UTF8: %s\", fn_mb); +@@ -549,7 +553,7 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" + SCM_RETURN(SCM_MAKE_STR_COPYING(fn_utf8)); + #else + SCM_RETURN(Scm_MakeString(fn_utf8, -1, -1, SCM_MAKSTR_COPYING|SCM_MAKSTR_INCOMPLETE)); +-#endif") ++#endif")) + + (define-cproc gtk-file-selection-get-selections (sel::<gtk-file-selection>) + "gchar **fns_mb = gtk_file_selection_get_selections(sel); +@@ -609,10 +613,14 @@ SCM_RETURN(Scm_Values2(Scm_MakeInteger(n_properties), h));" + (input-file "gtklabel.h") + + ;; Memory is owned by the widget so we don't need to free them. +-(define-cproc gtk-label-get-text (label::<gtk-label>) +- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));") +-(define-cproc gtk-label-get-label (label::<gtk-label>) +- "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));") ++(define-cproc-fix gtk-label-get-text ++ (fix-arguments! '(label::<gtk-label>)) ++ (fix-body! ++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_text(label)));")) ++(define-cproc-fix gtk-label-get-label ++ (fix-arguments! '(label::<gtk-label>)) ++ (fix-body! ++ "SCM_RETURN(SCM_MAKE_STR_COPYING(gtk_label_get_label(label)));")) + + (define-cproc-fix gtk-label-get-seleciton-bounds + (fix-arguments! '(label::<gtk-label>)) +@@ -1121,9 +1129,11 @@ return SCM_MAKE_STR_COPYING((char*)string);")) + + (input-file "gtkprogressbar.h") + +-(define-cproc gtk-progress-bar-get-text (pbar::<gtk-progress-bar>) +- "gchar *g = gtk_progress_bar_get_text(pbar); +- SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));") ++(define-cproc-fix gtk-progress-bar-get-text ++ (fix-arguments! '(pbar::<gtk-progress-bar>)) ++ (fix-body! ++ "gchar *g = gtk_progress_bar_get_text(pbar); ++ SCM_RETURN(SCM_MAKE_STR_COPYING_SAFELY(g));")) + + ;;================================================================== + ;; gtkradiobutton diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff new file mode 100644 index 000000000000..081c83df1fe5 --- /dev/null +++ b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-cpp.diff @@ -0,0 +1,11 @@ +--- a/lib/h2s/parse.scm ++++ b/lib/h2s/parse.scm +@@ -329,6 +329,8 @@ + (#/^\}\s*([\w_]+)/ (#f name) (make-enum name (reverse enums))) ; -----> + ;; empty line: + (#/^\s*$/ () (loop (read-line) enums)) ++ ;; preprocessor directive: ++ (#/^\s*#\s*\w+/ () (loop (read-line) enums)) + ;; + (test has-comment? (skip-comment line (cut loop <> enums) err-eof)) ; what if?: new_value, /* boring comment*/ + (#/\s+([\w_]+),?/ (#f enum) diff --git a/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff new file mode 100644 index 000000000000..9e8bbcf6e72d --- /dev/null +++ b/dev-scheme/gauche-gtk/files/gauche-gtk-h2s-gdk-pixbuf.diff @@ -0,0 +1,23 @@ +--- a/src/h2s-gtk.scm ++++ b/src/h2s-gtk.scm +@@ -50,6 +50,11 @@ + (define pango-directory + (find-header-dir #`"pango-,|pango-version|/pango/pango.h" + *header-search-paths*)) ++(define gdk-pixbuf-directory ++ (guard (e [(<error> e) ++ gtk-directory]) ++ (find-header-dir #`"gdk-pixbuf-,|gtk-version|/gdk-pixbuf/gdk-pixbuf.h" ++ *header-search-paths* ))) + + + (define (parse-gdk) +@@ -64,7 +69,7 @@ + (call-with-input-file "PANGOFILES" port->string-list))) + + (define (parse-gdk-pixbuf) +- (parse-headers #`",|gtk-directory|/gdk-pixbuf" ++ (parse-headers #`",|gdk-pixbuf-directory|/gdk-pixbuf" + (call-with-input-file "GDKPIXBUFFILES" port->string-list))) + + ;; defaults for the gauche-gtk package: diff --git a/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild b/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild new file mode 100644 index 000000000000..83b465480233 --- /dev/null +++ b/dev-scheme/gauche-gtk/gauche-gtk-0.6_pre1.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit autotools eutils + +MY_P="${P/g/G}" +MY_PN="${PN/g/G}2" +PV_COMMIT="598828842a339a44c32ab8c16f5f9a77f3c1c799" + +DESCRIPTION="GTK2 binding for Gauche" +HOMEPAGE="http://practical-scheme.net/gauche/" +SRC_URI="https://github.com/shirok/${MY_PN}/tarball/${PV_COMMIT} -> ${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~ppc x86" +IUSE="examples glgd nls opengl" +RESTRICT="test" + +DEPEND="${RDEPEND} + virtual/pkgconfig" +RDEPEND="x11-libs/gtk+:2 + dev-scheme/gauche + opengl? ( + x11-libs/gtkglext + dev-scheme/gauche-gl + )" +S="${WORKDIR}/shirok-${MY_PN}-${PV_COMMIT:0:7}" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-h2s-gdk-pixbuf.diff + epatch "${FILESDIR}"/${PN}-gtk-lib.hints.diff + epatch "${FILESDIR}"/${PN}-h2s-cpp.diff + eautoconf +} + +src_configure() { + local myconf + if use opengl; then + if use glgd; then + myconf="--enable-glgd" + if use nls; then + myconf="${myconf}-pango" + fi + else + myconf="--enable-gtkgl" + fi + fi + + econf ${myconf} +} + +src_compile() { + emake stubs + emake +} + +src_install() { + emake DESTDIR="${D}" install + dodoc ChangeLog README + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + docinto examples + dodoc examples/*.scm + # install gtk-tutorial + docinto examples/gtk-tutorial + dodoc examples/gtk-tutorial/* + if use opengl; then + # install gtkglext + dodoc -r examples/gtkglext + if use glgd; then + # install glgd + dodoc -r examples/glgd + fi + fi + fi +} diff --git a/dev-scheme/gauche-gtk/metadata.xml b/dev-scheme/gauche-gtk/metadata.xml new file mode 100644 index 000000000000..f91580dbecff --- /dev/null +++ b/dev-scheme/gauche-gtk/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hattya@gentoo.org</email> + </maintainer> + <longdescription> + Gauche extension module to use GTK. + </longdescription> + <use> + <flag name="glgd">Enable GL graph draw</flag> + </use> + <upstream> + <remote-id type="github">shirok/Gauche-gtk2</remote-id> + </upstream> +</pkgmetadata> |