Skip to content

Commit

Permalink
dev-perl/Tk: Copy from dev-perl/perl-tk
Browse files Browse the repository at this point in the history
Migrating to a more predictable name matching upstream conventions

Package-Manager: portage-2.2.27
  • Loading branch information
kentfredric authored and akhuettel committed Mar 14, 2016
1 parent b178dc0 commit 1493d22
Show file tree
Hide file tree
Showing 8 changed files with 387 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-perl/Tk/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DIST Tk-804.032.tar.gz 6933200 SHA256 8003fa82672367093d8fd26d89dcac695afad92f4ad406a106d56e07e9dd5949 SHA512 9370c7d954a11b4a16317d749fd06a8ea70b37309a9ba6bb8c9ff6fecf1a264d12f101fcc9aaf1aac781a42f45758e66c955b2f550d7894e94927060a5e29ef7 WHIRLPOOL 1851c9fde36f62a5a96e17c6c1c3eb206a948f669457ac765c28b560076e4b0e32f4ef6c49e725b90f7c704aa270265b7c305ceb3c1dc277eedfafc1a831cb10
DIST Tk-804.033.tar.gz 6924238 SHA256 84756e9b07a2555c8eecf88e63d5cbbba9b1aa97b1e71a3d4aa524a7995a88ad SHA512 ea56be8246123bbc570d86a7d4f1610349cced91ad92ab740baca4c280822aac2e3acab6334bef60b10a70d5840f331fa40b507aba47a7929f44960df95f2aee WHIRLPOOL 105bce71314e63d7512c6c8bcfa913c6026d8081ad2a5a1bde19f471552026d1c31d28589ae27a0468e73946f030e21d2b79f838033ba5623df94be02bd14826
55 changes: 55 additions & 0 deletions dev-perl/Tk/Tk-804.32.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

MODULE_AUTHOR=SREZIC
MODULE_VERSION=804.032
inherit multilib perl-module

DESCRIPTION="A Perl Module for Tk"

LICENSE+=" BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
IUSE=""

DEPEND="
media-libs/freetype
>=media-libs/libpng-1.4
virtual/jpeg
x11-libs/libX11
x11-libs/libXft"
RDEPEND="${DEPEND}"

# No test running here, requires an X server, and fails lots anyway.
SRC_TEST="skip"
PATCHES=(
"${FILESDIR}"/${PN}-804.31.0-xorg.patch
"${FILESDIR}"/freetype_location.patch
"${FILESDIR}"/mainwindow_segfaults.patch
)

src_prepare() {
MAKEOPTS+=" -j1" #333049
myconf=( X11ROOT=${EPREFIX}/usr XFT=1 -I${EPREFIX}/usr/include/ -l${EPREFIX}/usr/$(get_libdir) )
mydoc="ToDo VERSIONS"

perl-module_src_prepare
# fix detection logic for Prefix, bug #385621
sed -i -e "s:/usr:${EPREFIX}/usr:g" myConfig || die
# having this around breaks with perl-module and a case-IN-sensitive fs
rm build_ptk || die

# Remove all bundled libs, fixes #488194
local BUNDLED="PNG/libpng \
PNG/zlib \
JPEG/jpeg"
for dir in ${BUNDLED}; do
rm -r "${S}/${dir}" || die "Can't remove bundle"
# Makefile.PL can copy files to ${S}/${dir}, so recreate them back.
mkdir -p "${S}/${dir}" || die "Can't restore bundled dir"
sed -i "\#^${dir}#d" "${S}"/MANIFEST || die 'Can not remove bundled libs from MANIFEST'
done
}
53 changes: 53 additions & 0 deletions dev-perl/Tk/Tk-804.33.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

MODULE_AUTHOR=SREZIC
MODULE_VERSION=804.033
inherit multilib perl-module

DESCRIPTION="A Perl Module for Tk"

LICENSE+=" BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
IUSE=""

DEPEND="
media-libs/freetype
>=media-libs/libpng-1.4:0
virtual/jpeg
x11-libs/libX11
x11-libs/libXft"
RDEPEND="${DEPEND}"

# No test running here, requires an X server, and fails lots anyway.
SRC_TEST="skip"
PATCHES=(
"${FILESDIR}"/${P}-xorg.patch
)

src_prepare() {
MAKEOPTS+=" -j1" #333049
myconf=( X11ROOT=${EPREFIX}/usr XFT=1 -I${EPREFIX}/usr/include/ -l${EPREFIX}/usr/$(get_libdir) )
mydoc="ToDo VERSIONS"

perl-module_src_prepare
# fix detection logic for Prefix, bug #385621
sed -i -e "s:/usr:${EPREFIX}/usr:g" myConfig || die
# having this around breaks with perl-module and a case-IN-sensitive fs
rm build_ptk || die

# Remove all bundled libs, fixes #488194
local BUNDLED="PNG/libpng \
PNG/zlib \
JPEG/jpeg"
for dir in ${BUNDLED}; do
rm -r "${S}/${dir}" || die "Can't remove bundle"
# Makefile.PL can copy files to ${S}/${dir}, so recreate them back.
mkdir -p "${S}/${dir}" || die "Can't restore bundled dir"
sed -i "\#^${dir}#d" "${S}"/MANIFEST || die 'Can not remove bundled libs from MANIFEST'
done
}
43 changes: 43 additions & 0 deletions dev-perl/Tk/files/Tk-804.31.0-xorg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
myConfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/myConfig b/myConfig
index e0ace45..be52a82 100755
--- a/myConfig
+++ b/myConfig
@@ -307,7 +307,7 @@ if ($win_arch eq 'x') {
}
close(XMKMF);
while (defined $uidir) {
- last unless ($uidir =~ s!^.*-I(\S+)/lib/X11/config!!o);
+ last unless ($uidir =~ s!^.*-I(\S+)/lib(64)/X11/config!!o);
$try = $1;
$try =~ s/'x11root'/$ENV{X11ROOT}/;
push(@xdirs,$try);
@@ -356,7 +356,7 @@ if ($win_arch eq 'x') {
#
unless (defined $xlib)
{
- $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib')
+ $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib','/usr/lib64')
}

#
@@ -375,7 +375,7 @@ if ($win_arch eq 'x') {
exit 0;
}

- ($base) = $xlib =~ m#-L(.*)(?:/lib)$#x;
+ ($base) = $xlib =~ m#-L(.*)(?:/lib(64))$#x;
if (defined $X11INC)
{
$xinc = &IX11("$X11INC");
@@ -387,6 +387,8 @@ if ($win_arch eq 'x') {
{
warn "Cannot find X include files via $base/include\n";
$xinc = &IX11(map("$_/include",@xdirs),
+ chooseX11(</usr/include/X11*>),
+ '/usr/include',
'/usr/openwin/include',
chooseX11(</usr/X11*/include>),
chooseX11(</usr/include/X11*>),
41 changes: 41 additions & 0 deletions dev-perl/Tk/files/Tk-804.33.0-xorg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/myConfig b/myConfig
index fcf1933..14033cb 100755
--- a/myConfig
+++ b/myConfig
@@ -316,7 +316,7 @@ if ($win_arch eq 'x') {
}
close(XMKMF);
while (defined $uidir) {
- last unless ($uidir =~ s!^.*-I(\S+)/lib/X11/config!!o);
+ last unless ($uidir =~ s!^.*-I(\S+)/lib(64)/X11/config!!o);
$try = $1;
$try =~ s/'x11root'/$ENV{X11ROOT}/;
push(@xdirs,$try);
@@ -365,8 +365,7 @@ if ($win_arch eq 'x') {
#
unless (defined $xlib)
{
- $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib',
- '/opt/X11/lib')
+ $xlib = &lX11(0,chooseX11(</usr/X11*/lib>),chooseX11(</usr/lib/X11*>),</usr/Xfree*/lib>,'/usr/X386/lib','/opt/X11/lib','/usr/lib64')
}

#
@@ -385,7 +384,7 @@ if ($win_arch eq 'x') {
exit 0;
}

- ($base) = $xlib =~ m#-L(.*)(?:/lib)$#x;
+ ($base) = $xlib =~ m#-L(.*)(?:/lib(64))$#x;
if (defined $X11INC)
{
$xinc = &IX11("$X11INC");
@@ -397,6 +396,8 @@ if ($win_arch eq 'x') {
{
warn "Cannot find X include files via $base/include\n";
$xinc = &IX11(map("$_/include",@xdirs),
+ chooseX11(</usr/include/X11*>),
+ '/usr/include',
'/usr/openwin/include',
chooseX11(</usr/X11*/include>),
chooseX11(</usr/include/X11*>),
32 changes: 32 additions & 0 deletions dev-perl/Tk/files/freetype_location.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 1ca4589ef5a87999ec564081900bc8fdaed83c74 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <[email protected]>
Date: Sun, 2 Mar 2014 12:10:31 +0100
Subject: [PATCH] look also for /usr/include/freetype2/freetype.h

In some freetype installations (e.g. Debian/jessie) the intermediate
"freetype" directory may be missing in the include path.

This should fix
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740207
---
myConfig | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/myConfig b/myConfig
index 02d2ee5..3ca8144 100755
--- a/myConfig
+++ b/myConfig
@@ -147,7 +147,12 @@ sub Ift
{
foreach (map { "$_/freetype2" } @_)
{
- if (-d $_ && -d "$_/freetype" && -r "$_/freetype/freetype.h")
+ if (-r "$_/freetype.h") # location in Debian (since jessie)
+ {
+ print "Using -I$_ to find $_/freetype/freetype.h\n";
+ return "-I$_";
+ }
+ if (-r "$_/freetype/freetype.h") # location in FreeBSD (up to version 10.0) and Debian (up to wheezy)
{
print "Using -I$_ to find $_/freetype/freetype.h\n";
return "-I$_";
25 changes: 25 additions & 0 deletions dev-perl/Tk/files/mainwindow_segfaults.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From ba3a92a779f7adcf655b7e45b40ee5b0cb79bc8b Mon Sep 17 00:00:00 2001
From: Slaven Rezic <[email protected]>
Date: Fri, 14 Mar 2014 16:00:05 +0100
Subject: [PATCH] no segfaults if Tk::MainWindow::Create was called without
args

However, this case never happened in real life, as this function was
not supposed to be used directly anyway.
---
tkGlue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tkGlue.c b/tkGlue.c
index 57f0bca..ae595bf 100644
--- a/tkGlue.c
+++ b/tkGlue.c
@@ -2370,7 +2370,7 @@ XS(XS_Tk__MainWindow_Create)
STRLEN na;
Tcl_Interp *interp = Tcl_CreateInterp();
SV **args = &ST(0);
- char *appName = SvPV(ST(1),na);
+ char *appName = items >= 1 ? SvPV(ST(1),na) : "";
int offset = args - sp;
int code;
if (!initialized)
136 changes: 136 additions & 0 deletions dev-perl/Tk/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>[email protected]</email>
<name>Gentoo Perl Project</name>
</maintainer>
<upstream>
<remote-id type="cpan">Tk</remote-id>
<remote-id type="cpan-module">Tie::Watch</remote-id>
<remote-id type="cpan-module">Tie::Watch::Array</remote-id>
<remote-id type="cpan-module">Tie::Watch::Hash</remote-id>
<remote-id type="cpan-module">Tie::Watch::Scalar</remote-id>
<remote-id type="cpan-module">Tk</remote-id>
<remote-id type="cpan-module">Tk::Adjuster</remote-id>
<remote-id type="cpan-module">Tk::Adjuster::Item</remote-id>
<remote-id type="cpan-module">Tk::After</remote-id>
<remote-id type="cpan-module">Tk::Animation</remote-id>
<remote-id type="cpan-module">Tk::Balloon</remote-id>
<remote-id type="cpan-module">Tk::Bitmap</remote-id>
<remote-id type="cpan-module">Tk::BrowseEntry</remote-id>
<remote-id type="cpan-module">Tk::Button</remote-id>
<remote-id type="cpan-module">Tk::Canvas</remote-id>
<remote-id type="cpan-module">Tk::Checkbutton</remote-id>
<remote-id type="cpan-module">Tk::Clipboard</remote-id>
<remote-id type="cpan-module">Tk::CmdLine</remote-id>
<remote-id type="cpan-module">Tk::ColorDialog</remote-id>
<remote-id type="cpan-module">Tk::ColorEditor</remote-id>
<remote-id type="cpan-module">Tk::ColorSelect</remote-id>
<remote-id type="cpan-module">Tk::Compound</remote-id>
<remote-id type="cpan-module">Tk::Configure</remote-id>
<remote-id type="cpan-module">Tk::Derived</remote-id>
<remote-id type="cpan-module">Tk::Dialog</remote-id>
<remote-id type="cpan-module">Tk::DialogBox</remote-id>
<remote-id type="cpan-module">Tk::DirTree</remote-id>
<remote-id type="cpan-module">Tk::DirTreeDialog</remote-id>
<remote-id type="cpan-module">Tk::Dirlist</remote-id>
<remote-id type="cpan-module">Tk::DragDrop</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::Common</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::Local</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::Rect</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::SunConst</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::SunDrop</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::SunSite</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::Win32Drop</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::Win32Site</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::XDNDDrop</remote-id>
<remote-id type="cpan-module">Tk::DragDrop::XDNDSite</remote-id>
<remote-id type="cpan-module">Tk::DropSite</remote-id>
<remote-id type="cpan-module">Tk::DummyEncode</remote-id>
<remote-id type="cpan-module">Tk::DummyEncode::iso8859_1</remote-id>
<remote-id type="cpan-module">Tk::English</remote-id>
<remote-id type="cpan-module">Tk::Entry</remote-id>
<remote-id type="cpan-module">Tk::ErrorDialog</remote-id>
<remote-id type="cpan-module">Tk::Event</remote-id>
<remote-id type="cpan-module">Tk::Event::IO</remote-id>
<remote-id type="cpan-module">Tk::FBox</remote-id>
<remote-id type="cpan-module">Tk::FileSelect</remote-id>
<remote-id type="cpan-module">Tk::FloatEntry</remote-id>
<remote-id type="cpan-module">Tk::Font</remote-id>
<remote-id type="cpan-module">Tk::Frame</remote-id>
<remote-id type="cpan-module">Tk::HList</remote-id>
<remote-id type="cpan-module">Tk::IO</remote-id>
<remote-id type="cpan-module">Tk::IconList</remote-id>
<remote-id type="cpan-module">Tk::Image</remote-id>
<remote-id type="cpan-module">Tk::InputO</remote-id>
<remote-id type="cpan-module">Tk::ItemStyle</remote-id>
<remote-id type="cpan-module">Tk::JPEG</remote-id>
<remote-id type="cpan-module">Tk::LabEntry</remote-id>
<remote-id type="cpan-module">Tk::LabFrame</remote-id>
<remote-id type="cpan-module">Tk::LabRadiobutton</remote-id>
<remote-id type="cpan-module">Tk::Label</remote-id>
<remote-id type="cpan-module">Tk::LabeledEntryLabeledRadiobutton</remote-id>
<remote-id type="cpan-module">Tk::Labelframe</remote-id>
<remote-id type="cpan-module">Tk::Listbox</remote-id>
<remote-id type="cpan-module">Tk::MMtry</remote-id>
<remote-id type="cpan-module">Tk::MMutil</remote-id>
<remote-id type="cpan-module">Tk::MainWindow</remote-id>
<remote-id type="cpan-module">Tk::MakeDepend</remote-id>
<remote-id type="cpan-module">Tk::Menu</remote-id>
<remote-id type="cpan-module">Tk::Menu::Button</remote-id>
<remote-id type="cpan-module">Tk::Menu::Cascade</remote-id>
<remote-id type="cpan-module">Tk::Menu::Checkbutton</remote-id>
<remote-id type="cpan-module">Tk::Menu::Item</remote-id>
<remote-id type="cpan-module">Tk::Menu::Radiobutton</remote-id>
<remote-id type="cpan-module">Tk::Menu::Separator</remote-id>
<remote-id type="cpan-module">Tk::Menubar</remote-id>
<remote-id type="cpan-module">Tk::Menubutton</remote-id>
<remote-id type="cpan-module">Tk::Message</remote-id>
<remote-id type="cpan-module">Tk::MsgBox</remote-id>
<remote-id type="cpan-module">Tk::Mwm</remote-id>
<remote-id type="cpan-module">Tk::NBFrame</remote-id>
<remote-id type="cpan-module">Tk::NoteBook</remote-id>
<remote-id type="cpan-module">Tk::Optionmenu</remote-id>
<remote-id type="cpan-module">Tk::PNG</remote-id>
<remote-id type="cpan-module">Tk::Pane</remote-id>
<remote-id type="cpan-module">Tk::Panedwindow</remote-id>
<remote-id type="cpan-module">Tk::Photo</remote-id>
<remote-id type="cpan-module">Tk::Pixmap</remote-id>
<remote-id type="cpan-module">Tk::Pretty</remote-id>
<remote-id type="cpan-module">Tk::ProgressBar</remote-id>
<remote-id type="cpan-module">Tk::ROText</remote-id>
<remote-id type="cpan-module">Tk::Radiobutton</remote-id>
<remote-id type="cpan-module">Tk::Region</remote-id>
<remote-id type="cpan-module">Tk::Reindex</remote-id>
<remote-id type="cpan-module">Tk::ReindexedROText</remote-id>
<remote-id type="cpan-module">Tk::ReindexedText</remote-id>
<remote-id type="cpan-module">Tk::Scale</remote-id>
<remote-id type="cpan-module">Tk::Scrollbar</remote-id>
<remote-id type="cpan-module">Tk::Spinbox</remote-id>
<remote-id type="cpan-module">Tk::Stats</remote-id>
<remote-id type="cpan-module">Tk::Submethods</remote-id>
<remote-id type="cpan-module">Tk::TList</remote-id>
<remote-id type="cpan-module">Tk::Table</remote-id>
<remote-id type="cpan-module">Tk::Text</remote-id>
<remote-id type="cpan-module">Tk::Text::Tag</remote-id>
<remote-id type="cpan-module">Tk::TextEdit</remote-id>
<remote-id type="cpan-module">Tk::TextList</remote-id>
<remote-id type="cpan-module">Tk::TextUndo</remote-id>
<remote-id type="cpan-module">Tk::Tiler</remote-id>
<remote-id type="cpan-module">Tk::TixGrid</remote-id>
<remote-id type="cpan-module">Tk::Toplevel</remote-id>
<remote-id type="cpan-module">Tk::Trace</remote-id>
<remote-id type="cpan-module">Tk::Tree</remote-id>
<remote-id type="cpan-module">Tk::Widget</remote-id>
<remote-id type="cpan-module">Tk::WinPhoto</remote-id>
<remote-id type="cpan-module">Tk::Wm</remote-id>
<remote-id type="cpan-module">Tk::X</remote-id>
<remote-id type="cpan-module">Tk::X11Font</remote-id>
<remote-id type="cpan-module">Tk::Xlib</remote-id>
<remote-id type="cpan-module">Tk::Xrm</remote-id>
<remote-id type="cpan-module">Tk::install</remote-id>
<remote-id type="cpan-module">Tk::widgets</remote-id>
<remote-id type="cpan-module">WidgetDemo</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 1493d22

Please sign in to comment.