mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 05:44:17 +08:00
Merge pull request #79 from ids1024/perl-fork
A couple fixes for perl, and initial recipes for automake and autoconf
This commit is contained in:
commit
6812d47f4c
35
recipes/autoconf/recipe.sh
Normal file
35
recipes/autoconf/recipe.sh
Normal file
@ -0,0 +1,35 @@
|
||||
VERSION=2.69
|
||||
TAR=http://ftp.gnu.org/gnu/autoconf/autoconf-$VERSION.tar.xz
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
./configure --host=${HOST} --prefix=''
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
skip=1
|
||||
}
|
||||
38
recipes/automake/recipe.sh
Normal file
38
recipes/automake/recipe.sh
Normal file
@ -0,0 +1,38 @@
|
||||
VERSION=1.15
|
||||
TAR=http://ftp.gnu.org/gnu/automake/automake-$VERSION.tar.xz
|
||||
|
||||
function recipe_version {
|
||||
echo "$VERSION"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_update {
|
||||
echo "skipping update"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
wget -O lib/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
sed -i 's|.*/doc/help2man.*|\&\& true|' Makefile.in
|
||||
sed -i 's|install-info-am install-man|install-info-am|' Makefile.in
|
||||
|
||||
./configure --host=${HOST} --prefix=''
|
||||
make
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_test {
|
||||
echo "skipping test"
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_clean {
|
||||
make clean
|
||||
skip=1
|
||||
}
|
||||
|
||||
function recipe_stage {
|
||||
dest="$(realpath $1)"
|
||||
make DESTDIR="$dest" install
|
||||
skip=1
|
||||
}
|
||||
@ -1,3 +1,113 @@
|
||||
diff -ru source/ext/POSIX/POSIX.xs source-new/ext/POSIX/POSIX.xs
|
||||
--- source/ext/POSIX/POSIX.xs 2017-06-30 14:03:22.000000000 -0700
|
||||
+++ source-new/ext/POSIX/POSIX.xs 2017-08-17 19:21:59.498359355 -0700
|
||||
@@ -1302,6 +1302,7 @@
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
+#if 0
|
||||
#ifdef HAS_TZNAME
|
||||
# if !defined(WIN32) && !defined(__CYGWIN__) && !defined(NETWARE) && !defined(__UWIN__)
|
||||
extern char *tzname[];
|
||||
@@ -1311,6 +1312,7 @@
|
||||
char *tzname[] = { "" , "" };
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(__VMS) && !defined(__POSIX_SOURCE)
|
||||
|
||||
@@ -1327,10 +1329,11 @@
|
||||
#if defined (__CYGWIN__)
|
||||
# define tzname _tzname
|
||||
#endif
|
||||
-#if defined (WIN32) || defined (NETWARE)
|
||||
+#if 1
|
||||
# undef mkfifo
|
||||
# define mkfifo(a,b) not_here("mkfifo")
|
||||
# define ttyname(a) (char*)not_here("ttyname")
|
||||
+# define pause() not_here("pause")
|
||||
# define sigset_t long
|
||||
# define pid_t long
|
||||
# ifdef _MSC_VER
|
||||
@@ -1397,7 +1400,7 @@
|
||||
typedef HV* POSIX__SigAction;
|
||||
typedef int POSIX__SigNo;
|
||||
typedef int POSIX__Fd;
|
||||
-#ifdef I_TERMIOS
|
||||
+#if 0
|
||||
typedef struct termios* POSIX__Termios;
|
||||
#else /* Define termios types to int, and call not_here for the functions.*/
|
||||
#define POSIX__Termios int
|
||||
@@ -1829,7 +1832,7 @@
|
||||
const char * packname
|
||||
CODE:
|
||||
{
|
||||
-#ifdef I_TERMIOS
|
||||
+#if 0
|
||||
void *const p = allocate_struct(aTHX_ (ST(0) = sv_newmortal()),
|
||||
sizeof(struct termios), packname);
|
||||
/* The previous implementation stored a pointer to an uninitialised
|
||||
@@ -1896,7 +1899,7 @@
|
||||
getcflag = 2
|
||||
getlflag = 3
|
||||
CODE:
|
||||
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
|
||||
+#if 0 /* References a termios structure member so ifdef it out. */
|
||||
switch(ix) {
|
||||
case 0:
|
||||
RETVAL = termios_ref->c_iflag;
|
||||
@@ -1925,7 +1928,7 @@
|
||||
POSIX::Termios termios_ref
|
||||
unsigned int ccix
|
||||
CODE:
|
||||
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
|
||||
+#if 0 /* References a termios structure member so ifdef it out. */
|
||||
if (ccix >= NCCS)
|
||||
croak("Bad getcc subscript");
|
||||
RETVAL = termios_ref->c_cc[ccix];
|
||||
@@ -1957,7 +1960,7 @@
|
||||
setcflag = 2
|
||||
setlflag = 3
|
||||
CODE:
|
||||
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
|
||||
+#if 0 /* References a termios structure member so ifdef it out. */
|
||||
switch(ix) {
|
||||
case 0:
|
||||
termios_ref->c_iflag = flag;
|
||||
@@ -1982,7 +1985,7 @@
|
||||
unsigned int ccix
|
||||
cc_t cc
|
||||
CODE:
|
||||
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
|
||||
+#if 0 /* References a termios structure member so ifdef it out. */
|
||||
if (ccix >= NCCS)
|
||||
croak("Bad setcc subscript");
|
||||
termios_ref->c_cc[ccix] = cc;
|
||||
@@ -3540,15 +3543,15 @@
|
||||
void
|
||||
times()
|
||||
PPCODE:
|
||||
- struct tms tms;
|
||||
- clock_t realtime;
|
||||
- realtime = times( &tms );
|
||||
+ //struct tms tms;
|
||||
+ //clock_t realtime;
|
||||
+ //realtime = times( &tms );
|
||||
EXTEND(SP,5);
|
||||
- PUSHs( sv_2mortal( newSViv( (IV) realtime ) ) );
|
||||
- PUSHs( sv_2mortal( newSViv( (IV) tms.tms_utime ) ) );
|
||||
- PUSHs( sv_2mortal( newSViv( (IV) tms.tms_stime ) ) );
|
||||
- PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cutime ) ) );
|
||||
- PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cstime ) ) );
|
||||
+ PUSHs( sv_2mortal( newSViv( (IV) 0 ) ) );
|
||||
+ PUSHs( sv_2mortal( newSViv( (IV) 0 ) ) );
|
||||
+ PUSHs( sv_2mortal( newSViv( (IV) 0 ) ) );
|
||||
+ PUSHs( sv_2mortal( newSViv( (IV) 0 ) ) );
|
||||
+ PUSHs( sv_2mortal( newSViv( (IV) 0 ) ) );
|
||||
|
||||
double
|
||||
difftime(time1, time2)
|
||||
diff -ru source/mg.c source-new/mg.c
|
||||
--- source/mg.c 2017-06-30 14:03:22.000000000 -0700
|
||||
+++ source-new/mg.c 2017-08-17 14:40:37.669507085 -0700
|
||||
@ -171,7 +281,25 @@ diff -ru source/pp_sys.c source-new/pp_sys.c
|
||||
const struct group *grent;
|
||||
diff -ru source/util.c source-new/util.c
|
||||
--- source/util.c 2017-06-30 14:03:22.000000000 -0700
|
||||
+++ source-new/util.c 2017-08-17 14:47:03.963804576 -0700
|
||||
+++ source-new/util.c 2017-08-17 15:42:05.328932377 -0700
|
||||
@@ -2456,7 +2456,7 @@
|
||||
PerlIO *
|
||||
Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args)
|
||||
{
|
||||
-#if (!defined(DOSISH) || defined(HAS_FORK)) && !defined(OS2) && !defined(VMS) && !defined(NETWARE) && !defined(__LIBCATAMOUNT__) && !defined(__amigaos4__)
|
||||
+#if 1
|
||||
int p[2];
|
||||
I32 This, that;
|
||||
Pid_t pid;
|
||||
@@ -2821,7 +2821,7 @@
|
||||
Pid_t
|
||||
Perl_my_fork(void)
|
||||
{
|
||||
-#if defined(HAS_FORK)
|
||||
+#if 1
|
||||
Pid_t pid;
|
||||
#if defined(USE_ITHREADS) && !defined(HAS_PTHREAD_ATFORK)
|
||||
atfork_lock();
|
||||
@@ -2842,7 +2842,7 @@
|
||||
#endif /* HAS_FORK */
|
||||
}
|
||||
@ -181,3 +309,12 @@ diff -ru source/util.c source-new/util.c
|
||||
int
|
||||
dup2(int oldfd, int newfd)
|
||||
{
|
||||
@@ -3196,7 +3196,7 @@
|
||||
|
||||
#if defined(OS2)
|
||||
int pclose();
|
||||
-#ifdef HAS_FORK
|
||||
+#if 1
|
||||
int /* Cannot prototype with I32
|
||||
in os2ish.h. */
|
||||
my_syspclose(PerlIO *ptr)
|
||||
|
||||
@ -18,7 +18,7 @@ function recipe_build {
|
||||
tar --strip-components=1 -xvf perl-cross-1.1.6.tar.gz
|
||||
wget -O cnf/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
|
||||
sysroot="$($HOST-gcc -print-sysroot)"
|
||||
./configure --target=${HOST} --prefix='/' --sysroot="$sysroot" --disable-mod=Sys-Syslog,POSIX,Time-HiRes --with-libs='m'
|
||||
./configure --target=${HOST} --prefix='/' --sysroot="$sysroot" --disable-mod=Sys-Syslog,Time-HiRes --with-libs='m'
|
||||
sed -i "s/^#define Netdb_name_t.*/#define Netdb_name_t const char*/" config.h # XXX
|
||||
sed -i 's/#define Strerror(e).*$/#define Strerror(e) strerror(e)/' config.h #
|
||||
echo "#define HAS_VPRINTF" >> config.h
|
||||
|
||||
Loading…
Reference in New Issue
Block a user