create core package

This commit is contained in:
aydemir
2015-02-24 11:18:35 +02:00
parent 0e4b743b82
commit 70b25d0f95
1098 changed files with 169545 additions and 0 deletions
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
KeepSpecial=["perl"]
def setup():
# use system zlib
shelltools.unlinkDir("cpan/Compress-Raw-Zlib/zlib-src")
pisitools.dosed("MANIFEST", "zlib-src", deleteLine=True)
pisitools.dosed("cpan/Compress-Raw-Zlib/config.in", "(BUILD_ZLIB\s+=\s)True", r"\1False")
pisitools.dosed("cpan/Compress-Raw-Zlib/config.in", "(INCLUDE\s+=\s)\.\/zlib-src", r"\1/usr/include")
pisitools.dosed("cpan/Compress-Raw-Zlib/config.in", "(LIB\s+=\s)\.\/zlib-src", r"\1/usr/lib")
shelltools.export("LC_ALL", "C")
#fix one of tests
shelltools.system('sed -i "s#version vutil.c .*#version vutil.c f1c7e4778fcf78c04141f562b80183b91cbbf6c9#" t/porting/customized.dat')
shelltools.system('sh Configure -des \
-Darchname=%s-linux \
-Dcccdlflags=-fPIC \
-Dccdlflags="-rdynamic -Wl,--enable-new-dtags" \
-Dcc=%s \
-Dprefix=/usr \
-Dvendorprefix=/usr \
-Dsiteprefix=/usr \
-Ulocincpth= \
-Doptimize="%s" \
-Duselargefiles \
-Dusethreads \
-Duseithreads \
-Dd_semctl_semun \
-Dscriptdir=/usr/bin \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dinstallman1dir=%s/usr/share/man/man1 \
-Dinstallman3dir=%s/usr/share/man/man3 \
-Dlibperl=libperl.so.%s \
-Duseshrplib \
-Dman1ext=1 \
-Dman3ext=3pm \
-Dcf_by="PisiLinux" \
-Ud_csh \
-Di_ndbm \
-Di_gdbm \
-Di_db \
-Ubincompat5005 \
-Uversiononly \
-Dpager="/usr/bin/less -isr" \
-Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \
-Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \
-Ud_endservent_r_proto -Ud_setservent_r_proto \
-Dlibpth="/lib /usr/lib" \
' %(get.ARCH(), get.CC(), get.CFLAGS(), get.installDIR(), get.installDIR(), get.srcVERSION()))
def build():
# colorgcc uses Term::ANSIColor
paths = get.ENV("PATH").split(":")
if "/usr/share/colorgcc" in paths:
paths.remove("/usr/share/colorgcc")
shelltools.export("PATH", ":".join(paths))
##
autotools.make()
def check():
autotools.make("-j1 test")
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
pisitools.remove("/usr/bin/perl")
# Conflicts with perl-Module-Build
pisitools.remove("/usr/bin/config_data")
pisitools.dosym("/usr/bin/perl%s" % get.srcVERSION(), "/usr/bin/perl")
# Perl5 library
# NEEDS MODIFICATION FOR NEW VERSION
pisitools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so")
pisitools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5")
pisitools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5.20")
pisitools.dosym("/usr/lib/perl5/%s/%s-linux-thread-multi/CORE/libperl.so.%s" % (get.srcVERSION(), get.ARCH(), get.srcVERSION()), "/usr/lib/libperl.so.5.20.0")
# Docs
pisitools.dodir("/usr/share/doc/%s/html" % get.srcNAME())
shelltools.system('LD_LIBRARY_PATH=%s ./perl installhtml \
--podroot="." \
--podpath="lib:ext:pod:vms" \
--recurse \
--htmldir="%s/usr/share/doc/%s/html"' % (get.curDIR(), get.installDIR(), get.srcNAME()))
pisitools.dodoc("Changes*", "Artistic", "Copying", "README", "AUTHORS")
+10
View File
@@ -0,0 +1,10 @@
use Turkish 'uc';
use Turkish 'lc';
use utf8;
binmode STDOUT, ':utf8';
print uc("abğıiüşç");
print "\n";
print lc("ABĞIİÜŞÇ");
print "\n";
+62
View File
@@ -0,0 +1,62 @@
package Turkish;
require Exporter;
@ISA = (Exporter);
@EXPORT = qw(uc lc);
use vars qw($VERSION);
$VERSION = '0.1';
use strict;
use warnings;
use utf8;
sub uc
{
binmode STDOUT, ':utf8';
my $result;
foreach my $char (split(//,$_[0]))
{
if ($char eq 'i')
{
$result = $result.'İ';
}
elsif ($char eq 'ı')
{
$result = $result.'I';
}
else
{
$result = $result.uc($char);
}
}
return $result;
}
sub lc
{
binmode STDOUT, ':utf8';
my $result;
foreach my $char (split(//,$_[0]))
{
if ($char eq 'İ')
{
$result = $result.'i';
}
elsif ($char eq 'I')
{
$result = $result.'ı';
}
else
{
$result = $result.lc($char);
}
}
return $result;
}
1;
__END__
@@ -0,0 +1,50 @@
--- perl-5.20.0/vutil.c 2014-05-26 09:34:21.000000000 -0400
+++ perl-5.20.0-patched/vutil.c 2014-06-19 09:25:19.024409700 -0400
@@ -585,11 +585,29 @@
{
STRLEN len;
+#ifdef USE_LOCALE_NUMERIC
+ char *loc = setlocale(LC_NUMERIC, NULL);
+ if (loc) {
+ /* setlocale returns NULL on error */
+ if (loc[0] == 'C' && loc[1] == '\0') {
+ /* LC_NUMERIC is already C, nothing to do */
+ loc = NULL;
+ }
+ else {
+ loc = savepv(loc);
+ if (!setlocale(LC_NUMERIC, "C")) {
+ /* error! do not restore locale later */
+ Safefree(loc);
+ loc = NULL;
+ }
+ }
+ }
+#endif
+
/* may get too much accuracy */
char tbuf[64];
SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0;
char *buf;
- STORE_NUMERIC_LOCAL_SET_STANDARD();
if (sv) {
Perl_sv_catpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver));
len = SvCUR(sv);
@@ -599,7 +617,15 @@
len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver));
buf = tbuf;
}
- RESTORE_NUMERIC_LOCAL();
+
+#ifdef USE_LOCALE_NUMERIC
+ if (loc) {
+ /* restore locale */
+ setlocale(LC_NUMERIC, loc);
+ Safefree(loc);
+ }
+#endif
+
while (buf[len-1] == '0' && len > 0) len--;
if ( buf[len-1] == '.' ) len--; /* eat the trailing decimal */
version = savepvn(buf, len);
+100
View File
@@ -0,0 +1,100 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>perl</Name>
<Homepage>http://www.perl.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>Artistic</License>
<License>GPLv2</License>
<IsA>app:console</IsA>
<Summary>Larry Wall's Practical Extraction and Reporting Language</Summary>
<Description>Perl is a high-level programming language with roots in C, sed, awk and shell scripting. Perl is good at handling processes and files, and is especially good at handling text. Perl's hallmarks are practicality and efficiency. While it is used to do a lot of different things, Perl's most common applications are system administration utilities and web programming. A large proportion of the CGI scripts on the web are written in Perl. You need the perl package installed on your system so that your system can handle Perl scripts.</Description>
<Archive sha1sum="e925e4fc36e90eace19a1ca850f912618ba6788f" type="tarbz2">http://www.cpan.org/src/5.0/perl-5.20.0.tar.bz2</Archive>
<BuildDependencies>
<Dependency>db-devel</Dependency>
<Dependency>gdbm-devel</Dependency>
<Dependency>zlib-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch>perl-vutil-revert.patch</Patch>
</Patches>
</Source>
<Package>
<Name>perl-docs</Name>
<PartOf>programming.language.perl</PartOf>
<Summary>Documentation files for perl</Summary>
<Files>
<Path fileType="doc">/usr/share/doc/html</Path>
<Path fileType="doc">/usr/share/doc/perl/html</Path>
<Path fileType="man">/usr/share/man/</Path>
</Files>
</Package>
<Package>
<Name>perl</Name>
<RuntimeDependencies>
<Dependency>db</Dependency>
<Dependency>gdbm</Dependency>
<Dependency>zlib</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
<AdditionalFiles>
<!-- FIXME: Update perl version in target path when Perl version changes! -->
<AdditionalFile owner="root" permission="0644" target="/usr/lib/perl5/vendor_perl/5.20.0/Turkish.pm">Turkish.pm</AdditionalFile>
</AdditionalFiles>
</Package>
<History>
<Update release="7">
<Date>2014-09-10</Date>
<Version>5.20.0</Version>
<Comment>Version bump.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-05-11</Date>
<Version>5.18.2</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-08-28</Date>
<Version>5.18.1</Version>
<Comment>Version bump, clean perl.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-07-26</Date>
<Version>5.16.2</Version>
<Comment>Release bump, rebuild.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-02-19</Date>
<Version>5.16.2</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-09-06</Date>
<Version>5.16.1</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>perl</Name>
<Summary xml:lang="tr">Perl dili</Summary>
<Description xml:lang="tr">Perl kararlı, platform bağımsız programlama dilidir.</Description>
<Description xml:lang="fr">Perl est un langage de programmation multi-plateforme stable.</Description>
<Description xml:lang="de">Perl ist eine stabile, plattformunabhängige Programmiersprache</Description>
</Source>
</PISI>