diff options
Diffstat (limited to 'import-layers/meta-virtualization/recipes-devtools')
62 files changed, 2047 insertions, 0 deletions
diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc new file mode 100644 index 000000000..a65459fce --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4.inc @@ -0,0 +1,15 @@ +require go-common.inc + +PV = "1.4.3" +GO_BASEVERSION = "1.4" +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" + +SRC_URI += "\ + file://016-armhf-elf-header.patch \ + file://go-cross-backport-cmd-link-support-new-386-amd64-rel.patch \ + file://syslog.patch \ +" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" +SRC_URI[md5sum] = "dfb604511115dd402a77a553a5923a04" +SRC_URI[sha256sum] = "9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch new file mode 100644 index 000000000..1ae53a38c --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/016-armhf-elf-header.patch @@ -0,0 +1,21 @@ +Description: Use correct ELF header for armhf binaries. +Author: Adam Conrad <adconrad@ubuntu.com> +Last-Update: 2013-07-08 + +Index: go/src/cmd/ld/elf.c +=================================================================== +--- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800 ++++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800 +@@ -57,7 +57,11 @@ + case '5': + // we use EABI on both linux/arm and freebsd/arm. + if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd) +- hdr.flags = 0x5000002; // has entry point, Version5 EABI ++#ifdef __ARM_PCS_VFP ++ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI ++#else ++ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI ++#endif + // fallthrough + default: + hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */ diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch new file mode 100644 index 000000000..de3f49c0f --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/go-cross-backport-cmd-link-support-new-386-amd64-rel.patch @@ -0,0 +1,223 @@ +From d6eefad445831c161fca130f9bdf7b3848aac23c Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker <paul.gortmaker@windriver.com> +Date: Tue, 29 Mar 2016 21:14:33 -0400 +Subject: [PATCH] go-cross: backport "cmd/link: support new 386/amd64 + relocations" + +Newer binutils won't support building older go-1.4.3 as per: + +https://github.com/golang/go/issues/13114 + +Upstream commit 914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7 (see subj) +was identified as the fix and nominated for 1.4.4 but that release +never happened. The paths in 1.4.3 aren't the same as go1.6beta1~662 +where this commit appeared, but the NetBSD folks indicated what a +1.4.3 backport would look like here: https://gnats.netbsd.org/50777 + +This is based on that, but without the BSD wrapper infrastructure +layer that makes things look like patches of patches. + +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c +index 18b5aa311981..2e9d339aef87 100644 +--- a/src/cmd/6l/asm.c ++++ b/src/cmd/6l/asm.c +@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r) + return; + + case 256 + R_X86_64_GOTPCREL: ++ case 256 + R_X86_64_GOTPCRELX: ++ case 256 + R_X86_64_REX_GOTPCRELX: + if(targ->type != SDYNIMPORT) { + // have symbol + if(r->off >= 2 && s->p[r->off-2] == 0x8b) { +diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c +index 98c04240374f..cff29488e8af 100644 +--- a/src/cmd/8l/asm.c ++++ b/src/cmd/8l/asm.c +@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r) + return; + + case 256 + R_386_GOT32: ++ case 256 + R_386_GOT32X: + if(targ->type != SDYNIMPORT) { + // have symbol + if(r->off >= 2 && s->p[r->off-2] == 0x8b) { +diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h +index e84d996f2596..bbf2cfaa3cc0 100644 +--- a/src/cmd/ld/elf.h ++++ b/src/cmd/ld/elf.h +@@ -478,32 +478,47 @@ typedef struct { + * Relocation types. + */ + +-#define R_X86_64_NONE 0 /* No relocation. */ +-#define R_X86_64_64 1 /* Add 64 bit symbol value. */ +-#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */ +-#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */ +-#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */ +-#define R_X86_64_COPY 5 /* Copy data from shared object. */ +-#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */ +-#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */ +-#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */ +-#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */ +-#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */ +-#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ +-#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */ +-#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ +-#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ +-#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ +-#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ +-#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ +-#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ +-#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ +-#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ +-#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ +-#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ +-#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +- +-#define R_X86_64_COUNT 24 /* Count of defined relocation types. */ ++#define R_X86_64_NONE 0 ++#define R_X86_64_64 1 ++#define R_X86_64_PC32 2 ++#define R_X86_64_GOT32 3 ++#define R_X86_64_PLT32 4 ++#define R_X86_64_COPY 5 ++#define R_X86_64_GLOB_DAT 6 ++#define R_X86_64_JMP_SLOT 7 ++#define R_X86_64_RELATIVE 8 ++#define R_X86_64_GOTPCREL 9 ++#define R_X86_64_32 10 ++#define R_X86_64_32S 11 ++#define R_X86_64_16 12 ++#define R_X86_64_PC16 13 ++#define R_X86_64_8 14 ++#define R_X86_64_PC8 15 ++#define R_X86_64_DTPMOD64 16 ++#define R_X86_64_DTPOFF64 17 ++#define R_X86_64_TPOFF64 18 ++#define R_X86_64_TLSGD 19 ++#define R_X86_64_TLSLD 20 ++#define R_X86_64_DTPOFF32 21 ++#define R_X86_64_GOTTPOFF 22 ++#define R_X86_64_TPOFF32 23 ++#define R_X86_64_PC64 24 ++#define R_X86_64_GOTOFF64 25 ++#define R_X86_64_GOTPC32 26 ++#define R_X86_64_GOT64 27 ++#define R_X86_64_GOTPCREL64 28 ++#define R_X86_64_GOTPC64 29 ++#define R_X86_64_GOTPLT64 30 ++#define R_X86_64_PLTOFF64 31 ++#define R_X86_64_SIZE32 32 ++#define R_X86_64_SIZE64 33 ++#define R_X86_64_GOTPC32_TLSDEC 34 ++#define R_X86_64_TLSDESC_CALL 35 ++#define R_X86_64_TLSDESC 36 ++#define R_X86_64_IRELATIVE 37 ++#define R_X86_64_PC32_BND 40 ++#define R_X86_64_GOTPCRELX 41 ++#define R_X86_64_REX_GOTPCRELX 42 + + + #define R_ALPHA_NONE 0 /* No reloc */ +@@ -581,39 +596,42 @@ typedef struct { + #define R_ARM_COUNT 38 /* Count of defined relocation types. */ + + +-#define R_386_NONE 0 /* No relocation. */ +-#define R_386_32 1 /* Add symbol value. */ +-#define R_386_PC32 2 /* Add PC-relative symbol value. */ +-#define R_386_GOT32 3 /* Add PC-relative GOT offset. */ +-#define R_386_PLT32 4 /* Add PC-relative PLT offset. */ +-#define R_386_COPY 5 /* Copy data from shared object. */ +-#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */ +-#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */ +-#define R_386_RELATIVE 8 /* Add load address of shared object. */ +-#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */ +-#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */ +-#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */ +-#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */ +-#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */ +-#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */ +-#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */ +-#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */ +-#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */ +-#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */ +-#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */ +-#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */ +-#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */ +-#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */ +-#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */ +-#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */ +-#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */ +-#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */ +-#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ +- +-#define R_386_COUNT 38 /* Count of defined relocation types. */ ++#define R_386_NONE 0 ++#define R_386_32 1 ++#define R_386_PC32 2 ++#define R_386_GOT32 3 ++#define R_386_PLT32 4 ++#define R_386_COPY 5 ++#define R_386_GLOB_DAT 6 ++#define R_386_JMP_SLOT 7 ++#define R_386_RELATIVE 8 ++#define R_386_GOTOFF 9 ++#define R_386_GOTPC 10 ++#define R_386_TLS_TPOFF 14 ++#define R_386_TLS_IE 15 ++#define R_386_TLS_GOTIE 16 ++#define R_386_TLS_LE 17 ++#define R_386_TLS_GD 18 ++#define R_386_TLS_LDM 19 ++#define R_386_TLS_GD_32 24 ++#define R_386_TLS_GD_PUSH 25 ++#define R_386_TLS_GD_CALL 26 ++#define R_386_TLS_GD_POP 27 ++#define R_386_TLS_LDM_32 28 ++#define R_386_TLS_LDM_PUSH 29 ++#define R_386_TLS_LDM_CALL 30 ++#define R_386_TLS_LDM_POP 31 ++#define R_386_TLS_LDO_32 32 ++#define R_386_TLS_IE_32 33 ++#define R_386_TLS_LE_32 34 ++#define R_386_TLS_DTPMOD32 35 ++#define R_386_TLS_DTPOFF32 36 ++#define R_386_TLS_TPOFF32 37 ++#define R_386_TLS_GOTDESC 39 ++#define R_386_TLS_DESC_CALL 40 ++#define R_386_TLS_DESC 41 ++#define R_386_IRELATIVE 42 ++#define R_386_GOT32X 43 + + #define R_PPC_NONE 0 /* No relocation. */ + #define R_PPC_ADDR32 1 +diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c +index dd5fa0d2a839..2e2fbd17377f 100644 +--- a/src/cmd/ld/ldelf.c ++++ b/src/cmd/ld/ldelf.c +@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz) + case R('6', R_X86_64_PC32): + case R('6', R_X86_64_PLT32): + case R('6', R_X86_64_GOTPCREL): ++ case R('6', R_X86_64_GOTPCRELX): ++ case R('6', R_X86_64_REX_GOTPCRELX): + case R('8', R_386_32): + case R('8', R_386_PC32): + case R('8', R_386_GOT32): + case R('8', R_386_PLT32): + case R('8', R_386_GOTOFF): + case R('8', R_386_GOTPC): ++ case R('8', R_386_GOT32X): + *siz = 4; + break; + case R('6', R_X86_64_64): +-- +2.7.2 + diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch new file mode 100644 index 000000000..ce82a4f2b --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.4/syslog.patch @@ -0,0 +1,57 @@ +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go +--- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 +@@ -33,6 +33,9 @@ + const severityMask = 0x07 + const facilityMask = 0xf8 + ++var writeTimeout = 1 * time.Second ++var connectTimeout = 1 * time.Second ++ + const ( + // Severity. + +@@ -100,6 +103,7 @@ + type serverConn interface { + writeString(p Priority, hostname, tag, s, nl string) error + close() error ++ setWriteDeadline(t time.Time) error + } + + type netConn struct { +@@ -273,7 +277,11 @@ + nl = "\n" + } + +- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) ++ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) ++ if err != nil { ++ return 0, err ++ } ++ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) + if err != nil { + return 0, err + } +@@ -305,6 +313,10 @@ + return n.conn.Close() + } + ++func (n *netConn) setWriteDeadline(t time.Time) error { ++ return n.conn.SetWriteDeadline(t) ++} ++ + // NewLogger creates a log.Logger whose output is written to + // the system log service with the specified priority. The logFlag + // argument is the flag set passed through to log.New to create +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go +--- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 +@@ -19,7 +19,7 @@ + logPaths := []string{"/dev/log", "/var/run/syslog"} + for _, network := range logTypes { + for _, path := range logPaths { +- conn, err := net.Dial(network, path) ++ conn, err := net.DialTimeout(network, path, connectTimeout) + if err != nil { + continue + } else { diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc new file mode 100644 index 000000000..bb91ed8a8 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5.inc @@ -0,0 +1,19 @@ +require go-common.inc + +PV = "1.5.2" +GO_BASEVERSION = "1.5" +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" + + +SRC_URI += "\ + file://armhf-elf-header.patch \ + file://syslog.patch \ + file://fix-target-cc-for-build.patch \ + file://fix-cc-handling.patch \ + file://split-host-and-target-build.patch \ + file://gotooldir.patch \ +" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" +SRC_URI[md5sum] = "38fed22e7b80672291e7cba7fb9c3475" +SRC_URI[sha256sum] = "f3ddd624c00461641ce3d3a8d8e3c622392384ca7699e901b370a4eac5987a74" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch new file mode 100644 index 000000000..f56869b22 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/armhf-elf-header.patch @@ -0,0 +1,19 @@ +Index: go/src/cmd/link/internal/ld/elf.go +=================================================================== +--- go.orig/src/cmd/link/internal/ld/elf.go 2015-07-29 13:05:25.952533140 -0700 ++++ go/src/cmd/link/internal/ld/elf.go 2015-07-29 13:14:53.413112995 -0700 +@@ -780,7 +780,13 @@ + // 32-bit architectures + case '5': + // we use EABI on both linux/arm and freebsd/arm. +- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { ++ if HEADTYPE == obj.Hlinux { ++ if Ctxt.Goarm == 7 { ++ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float ++ } else { ++ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float ++ } ++ } else if HEADTYPE == obj.Hfreebsd { + ehdr.flags = 0x5000002 // has entry point, Version5 EABI + } + fallthrough diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch new file mode 100644 index 000000000..85770a937 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-cc-handling.patch @@ -0,0 +1,46 @@ +Index: go/src/cmd/go/build.go +=================================================================== +--- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 +@@ -2805,12 +2805,24 @@ + return b.ccompilerCmd("CC", defaultCC, objdir) + } + ++// gccCmd returns a gcc command line prefix ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gccCmdForReal() []string { ++ return envList("CC", defaultCC) ++} ++ + // gxxCmd returns a g++ command line prefix + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. + func (b *builder) gxxCmd(objdir string) []string { + return b.ccompilerCmd("CXX", defaultCXX, objdir) + } + ++// gxxCmd returns a g++ command line prefix ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gxxCmdForReal() []string { ++ return envList("CXX", defaultCXX) ++} ++ + // ccompilerCmd returns a command line prefix for the given environment + // variable and using the default command when the variable is empty. + func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { +Index: go/src/cmd/go/env.go +=================================================================== +--- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 +@@ -52,10 +52,9 @@ + + if goos != "plan9" { + cmd := b.gccCmd(".") +- env = append(env, envVar{"CC", cmd[0]}) ++ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) + env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) +- cmd = b.gxxCmd(".") +- env = append(env, envVar{"CXX", cmd[0]}) ++ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) + } + + if buildContext.CgoEnabled { diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch new file mode 100644 index 000000000..adfeb6b55 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/fix-target-cc-for-build.patch @@ -0,0 +1,13 @@ +Index: go/src/make.bash +=================================================================== +--- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 ++++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 +@@ -158,7 +158,7 @@ + fi + + echo "##### Building packages and commands for $GOOS/$GOARCH." +-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd ++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd + echo + + rm -f "$GOTOOLDIR"/go_bootstrap diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch new file mode 100644 index 000000000..473a32801 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/gotooldir.patch @@ -0,0 +1,26 @@ +Index: go/src/go/build/build.go +=================================================================== +--- go.orig/src/go/build/build.go ++++ go/src/go/build/build.go +@@ -1388,7 +1388,7 @@ func init() { + } + + // ToolDir is the directory containing build tools. +-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) + + // IsLocalImport reports whether the import path is + // a local import path, like ".", "..", "./foo", or "../foo". +Index: go/src/cmd/go/build.go +=================================================================== +--- go.orig/src/cmd/go/build.go ++++ go/src/cmd/go/build.go +@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err + } + + cgoExe := tool("cgo") +- if a.cgo != nil && a.cgo.target != "" { ++ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { + cgoExe = a.cgo.target + } + outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch new file mode 100644 index 000000000..85fb240a7 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/split-host-and-target-build.patch @@ -0,0 +1,58 @@ +Index: go/src/make.bash +=================================================================== +--- go.orig/src/make.bash ++++ go/src/make.bash +@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then + buildall="" + shift + fi +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap +-# Delay move of dist tool to now, because bootstrap may clear tool directory. +-mv cmd/dist/dist "$GOTOOLDIR"/dist +-echo + +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then ++do_host_build="yes" ++do_target_build="yes" ++if [ "$1" = "--target-only" ]; then ++ do_host_build="no" ++ shift ++elif [ "$1" = "--host-only" ]; then ++ do_target_build="no" ++ shift ++fi ++ ++if [ "$do_host_build" = "yes" ]; then ++ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ # Delay move of dist tool to now, because bootstrap may clear tool directory. ++ mv cmd/dist/dist "$GOTOOLDIR"/dist ++ echo ++ + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH + echo + fi + +-echo "##### Building packages and commands for $GOOS/$GOARCH." +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd +-echo ++if [ "$do_target_build" = "yes" ]; then ++ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" ++ echo "##### Building packages and commands for $GOOS/$GOARCH." ++ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then ++ rm -rf ./host-tools ++ mkdir ./host-tools ++ mv "$GOTOOLDIR"/* ./host-tools ++ GOTOOLDIR="$PWD/host-tools" ++ fi ++ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} ++ echo + +-rm -f "$GOTOOLDIR"/go_bootstrap ++ rm -f "$GOTOOLDIR"/go_bootstrap ++fi + + if [ "$1" != "--no-banner" ]; then + "$GOTOOLDIR"/dist banner diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch new file mode 100644 index 000000000..ce82a4f2b --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.5/syslog.patch @@ -0,0 +1,57 @@ +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go +--- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 +@@ -33,6 +33,9 @@ + const severityMask = 0x07 + const facilityMask = 0xf8 + ++var writeTimeout = 1 * time.Second ++var connectTimeout = 1 * time.Second ++ + const ( + // Severity. + +@@ -100,6 +103,7 @@ + type serverConn interface { + writeString(p Priority, hostname, tag, s, nl string) error + close() error ++ setWriteDeadline(t time.Time) error + } + + type netConn struct { +@@ -273,7 +277,11 @@ + nl = "\n" + } + +- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) ++ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) ++ if err != nil { ++ return 0, err ++ } ++ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) + if err != nil { + return 0, err + } +@@ -305,6 +313,10 @@ + return n.conn.Close() + } + ++func (n *netConn) setWriteDeadline(t time.Time) error { ++ return n.conn.SetWriteDeadline(t) ++} ++ + // NewLogger creates a log.Logger whose output is written to + // the system log service with the specified priority. The logFlag + // argument is the flag set passed through to log.New to create +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go +--- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 +@@ -19,7 +19,7 @@ + logPaths := []string{"/dev/log", "/var/run/syslog"} + for _, network := range logTypes { + for _, path := range logPaths { +- conn, err := net.Dial(network, path) ++ conn, err := net.DialTimeout(network, path, connectTimeout) + if err != nil { + continue + } else { diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc new file mode 100644 index 000000000..7a57eaf00 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6.inc @@ -0,0 +1,19 @@ +require go-common.inc + +PV = "1.6.2" +GO_BASEVERSION = "1.6" +FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/go-${GO_BASEVERSION}:" + + +SRC_URI += "\ + file://armhf-elf-header.patch \ + file://syslog.patch \ + file://fix-target-cc-for-build.patch \ + file://fix-cc-handling.patch \ + file://split-host-and-target-build.patch \ + file://gotooldir.patch \ +" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=591778525c869cdde0ab5a1bf283cd81" +SRC_URI[md5sum] = "d1b50fa98d9a71eeee829051411e6207" +SRC_URI[sha256sum] = "787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch new file mode 100644 index 000000000..6113138c6 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/armhf-elf-header.patch @@ -0,0 +1,19 @@ +Index: go/src/cmd/link/internal/ld/elf.go +=================================================================== +--- go.orig/src/cmd/link/internal/ld/elf.go ++++ go/src/cmd/link/internal/ld/elf.go +@@ -827,7 +827,13 @@ + // 32-bit architectures + case '5': + // we use EABI on both linux/arm and freebsd/arm. +- if HEADTYPE == obj.Hlinux || HEADTYPE == obj.Hfreebsd { ++ if HEADTYPE == obj.Hlinux { ++ if Ctxt.Goarm == 7 { ++ ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float ++ } else { ++ ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float ++ } ++ } else if HEADTYPE == obj.Hfreebsd { + // We set a value here that makes no indication of which + // float ABI the object uses, because this is information + // used by the dynamic linker to compare executables and diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch new file mode 100644 index 000000000..85770a937 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-cc-handling.patch @@ -0,0 +1,46 @@ +Index: go/src/cmd/go/build.go +=================================================================== +--- go.orig/src/cmd/go/build.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/build.go 2015-07-30 07:37:40.529818586 -0700 +@@ -2805,12 +2805,24 @@ + return b.ccompilerCmd("CC", defaultCC, objdir) + } + ++// gccCmd returns a gcc command line prefix ++// defaultCC is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gccCmdForReal() []string { ++ return envList("CC", defaultCC) ++} ++ + // gxxCmd returns a g++ command line prefix + // defaultCXX is defined in zdefaultcc.go, written by cmd/dist. + func (b *builder) gxxCmd(objdir string) []string { + return b.ccompilerCmd("CXX", defaultCXX, objdir) + } + ++// gxxCmd returns a g++ command line prefix ++// defaultCXX is defined in zdefaultcc.go, written by cmd/dist. ++func (b *builder) gxxCmdForReal() []string { ++ return envList("CXX", defaultCXX) ++} ++ + // ccompilerCmd returns a command line prefix for the given environment + // variable and using the default command when the variable is empty. + func (b *builder) ccompilerCmd(envvar, defcmd, objdir string) []string { +Index: go/src/cmd/go/env.go +=================================================================== +--- go.orig/src/cmd/go/env.go 2015-07-29 14:48:40.323185807 -0700 ++++ go/src/cmd/go/env.go 2015-07-30 07:40:54.461655721 -0700 +@@ -52,10 +52,9 @@ + + if goos != "plan9" { + cmd := b.gccCmd(".") +- env = append(env, envVar{"CC", cmd[0]}) ++ env = append(env, envVar{"CC", strings.Join(b.gccCmdForReal(), " ")}) + env = append(env, envVar{"GOGCCFLAGS", strings.Join(cmd[3:], " ")}) +- cmd = b.gxxCmd(".") +- env = append(env, envVar{"CXX", cmd[0]}) ++ env = append(env, envVar{"CXX", strings.Join(b.gxxCmdForReal(), " ")}) + } + + if buildContext.CgoEnabled { diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch new file mode 100644 index 000000000..adfeb6b55 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/fix-target-cc-for-build.patch @@ -0,0 +1,13 @@ +Index: go/src/make.bash +=================================================================== +--- go.orig/src/make.bash 2015-07-29 13:28:11.334031696 -0700 ++++ go/src/make.bash 2015-07-29 13:36:55.814465630 -0700 +@@ -158,7 +158,7 @@ + fi + + echo "##### Building packages and commands for $GOOS/$GOARCH." +-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd ++CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd + echo + + rm -f "$GOTOOLDIR"/go_bootstrap diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch new file mode 100644 index 000000000..473a32801 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/gotooldir.patch @@ -0,0 +1,26 @@ +Index: go/src/go/build/build.go +=================================================================== +--- go.orig/src/go/build/build.go ++++ go/src/go/build/build.go +@@ -1388,7 +1388,7 @@ func init() { + } + + // ToolDir is the directory containing build tools. +-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH) ++var ToolDir = envOr("GOTOOLDIR", filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)) + + // IsLocalImport reports whether the import path is + // a local import path, like ".", "..", "./foo", or "../foo". +Index: go/src/cmd/go/build.go +=================================================================== +--- go.orig/src/cmd/go/build.go ++++ go/src/cmd/go/build.go +@@ -1312,7 +1312,7 @@ func (b *builder) build(a *action) (err + } + + cgoExe := tool("cgo") +- if a.cgo != nil && a.cgo.target != "" { ++ if a.cgo != nil && a.cgo.target != "" && os.Getenv("GOTOOLDIR") == "" { + cgoExe = a.cgo.target + } + outGo, outObj, err := b.cgo(a.p, cgoExe, obj, pcCFLAGS, pcLDFLAGS, cgofiles, gccfiles, cxxfiles, a.p.MFiles) diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch new file mode 100644 index 000000000..85fb240a7 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch @@ -0,0 +1,58 @@ +Index: go/src/make.bash +=================================================================== +--- go.orig/src/make.bash ++++ go/src/make.bash +@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then + buildall="" + shift + fi +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap +-# Delay move of dist tool to now, because bootstrap may clear tool directory. +-mv cmd/dist/dist "$GOTOOLDIR"/dist +-echo + +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then ++do_host_build="yes" ++do_target_build="yes" ++if [ "$1" = "--target-only" ]; then ++ do_host_build="no" ++ shift ++elif [ "$1" = "--host-only" ]; then ++ do_target_build="no" ++ shift ++fi ++ ++if [ "$do_host_build" = "yes" ]; then ++ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ # Delay move of dist tool to now, because bootstrap may clear tool directory. ++ mv cmd/dist/dist "$GOTOOLDIR"/dist ++ echo ++ + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH + echo + fi + +-echo "##### Building packages and commands for $GOOS/$GOARCH." +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd +-echo ++if [ "$do_target_build" = "yes" ]; then ++ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" ++ echo "##### Building packages and commands for $GOOS/$GOARCH." ++ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then ++ rm -rf ./host-tools ++ mkdir ./host-tools ++ mv "$GOTOOLDIR"/* ./host-tools ++ GOTOOLDIR="$PWD/host-tools" ++ fi ++ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} ++ echo + +-rm -f "$GOTOOLDIR"/go_bootstrap ++ rm -f "$GOTOOLDIR"/go_bootstrap ++fi + + if [ "$1" != "--no-banner" ]; then + "$GOTOOLDIR"/dist banner diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch new file mode 100644 index 000000000..ce82a4f2b --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-1.6/syslog.patch @@ -0,0 +1,57 @@ +diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go +--- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 +@@ -33,6 +33,9 @@ + const severityMask = 0x07 + const facilityMask = 0xf8 + ++var writeTimeout = 1 * time.Second ++var connectTimeout = 1 * time.Second ++ + const ( + // Severity. + +@@ -100,6 +103,7 @@ + type serverConn interface { + writeString(p Priority, hostname, tag, s, nl string) error + close() error ++ setWriteDeadline(t time.Time) error + } + + type netConn struct { +@@ -273,7 +277,11 @@ + nl = "\n" + } + +- err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) ++ err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) ++ if err != nil { ++ return 0, err ++ } ++ err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) + if err != nil { + return 0, err + } +@@ -305,6 +313,10 @@ + return n.conn.Close() + } + ++func (n *netConn) setWriteDeadline(t time.Time) error { ++ return n.conn.SetWriteDeadline(t) ++} ++ + // NewLogger creates a log.Logger whose output is written to + // the system log service with the specified priority. The logFlag + // argument is the flag set passed through to log.New to create +diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go +--- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 ++++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 +@@ -19,7 +19,7 @@ + logPaths := []string{"/dev/log", "/var/run/syslog"} + for _, network := range logTypes { + for _, path := range logPaths { +- conn, err := net.Dial(network, path) ++ conn, err := net.DialTimeout(network, path, connectTimeout) + if err != nil { + continue + } else { diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc new file mode 100644 index 000000000..f9587ea9a --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-common.inc @@ -0,0 +1,20 @@ +SUMMARY = "Go programming language compiler" +DESCRIPTION = " The Go programming language is an open source project to make \ + programmers more productive. Go is expressive, concise, clean, and\ + efficient. Its concurrency mechanisms make it easy to write programs\ + that get the most out of multicore and networked machines, while its\ + novel type system enables flexible and modular program construction.\ + Go compiles quickly to machine code yet has the convenience of\ + garbage collection and the power of run-time reflection. It's a\ + fast, statically typed, compiled language that feels like a\ + dynamically typed, interpreted language." +HOMEPAGE = " http://golang.org/" +LICENSE = "BSD-3-Clause" + +inherit go-osarchmap + +SRC_URI = "http://golang.org/dl/go${PV}.src.tar.gz" +S = "${WORKDIR}/go" +B = "${S}" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc new file mode 100644 index 000000000..613e9c7c0 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross.inc @@ -0,0 +1,49 @@ +inherit cross + +DEPENDS += "go-native" + +export GOHOSTOS = "${BUILD_GOOS}" +export GOHOSTARCH = "${BUILD_GOARCH}" +export GOOS = "${TARGET_GOOS}" +export GOARCH = "${TARGET_GOARCH}" +export GOARM = "${TARGET_GOARM}" +export GOROOT_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/go" +export GOROOT_FINAL = "${libdir}/go" +export CGO_ENABLED = "1" +export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" +export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}" +CC = "${@d.getVar('BUILD_CC', True).strip()}" + +do_configure[noexec] = "1" + +do_compile() { + export GOBIN="${B}/bin" + rm -rf ${GOBIN} ${B}/pkg + mkdir ${GOBIN} + + export TMPDIR=${WORKDIR}/build-tmp + mkdir -p ${WORKDIR}/build-tmp + + cd src + ./make.bash --host-only +} + +do_install() { + install -d ${D}${libdir}/go + cp -a ${B}/pkg ${D}${libdir}/go/ + install -d ${D}${libdir}/go/src + (cd ${S}/src; for d in *; do \ + [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ + done) + install -d ${D}${bindir} + for f in ${B}/bin/* + do + install -m755 $f ${D}${bindir} + done +} + +do_package[noexec] = "1" +do_packagedata[noexec] = "1" +do_package_write_ipk[noexec] = "1" +do_package_write_deb[noexec] = "1" +do_package_write_rpm[noexec] = "1" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb new file mode 100644 index 000000000..80b5a03f6 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.5.bb @@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb new file mode 100644 index 000000000..80b5a03f6 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-cross_1.6.bb @@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc new file mode 100644 index 000000000..8b4be9ec7 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native.inc @@ -0,0 +1,54 @@ +inherit native + +export GOOS = "${BUILD_GOOS}" +export GOARCH = "${BUILD_GOARCH}" +export GOROOT_FINAL = "${STAGING_LIBDIR_NATIVE}/go" +export CGO_ENABLED = "1" + +do_configure[noexec] = "1" + +do_compile() { + export GOBIN="${B}/bin" + rm -rf ${GOBIN} + mkdir ${GOBIN} + + export TMPDIR=${WORKDIR}/build-tmp + mkdir -p ${WORKDIR}/build-tmp + + cd src + ./make.bash --host-only +} + + +make_wrapper() { + rm -f ${D}${bindir}/$2 + cat <<END >${D}${bindir}/$2 +#!/bin/bash +here=\`dirname \$0\` +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" +\$here/../lib/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$2 +} + +do_install() { + install -d ${D}${libdir}/go + cp -a ${B}/pkg ${D}${libdir}/go/ + install -d ${D}${libdir}/go/src + (cd ${S}/src; for d in *; do \ + [ -d $d ] && cp -a ${S}/src/$d ${D}${libdir}/go/src/; \ + done) + install -d ${D}${bindir} ${D}${libdir}/go/bin + for f in ${B}/bin/* + do + base=`basename $f` + install -m755 $f ${D}${libdir}/go/bin + make_wrapper $base $base + done +} + +do_package[noexec] = "1" +do_packagedata[noexec] = "1" +do_package_write_ipk[noexec] = "1" +do_package_write_deb[noexec] = "1" +do_package_write_rpm[noexec] = "1" diff --git a/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb new file mode 100644 index 000000000..cf186e781 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go-cross/go-native_1.4.bb @@ -0,0 +1,2 @@ +require go-native.inc +require go-${PV}.inc diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb new file mode 100644 index 000000000..4f8f43163 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-capability_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Utilities for manipulating POSIX capabilities in Go." +HOMEPAGE = "https://github.com/syndtr/gocapability" +SECTION = "devel/go" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a7304f5073e7be4ba7bffabbf9f2bbca" + +SRCNAME = "gocapability" + +PKG_NAME = "github.com/syndtr/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "8e4cdcb3c22b40d5e330ade0b68cb2e2a3cf6f98" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_capability_sysroot_preprocess" + +go_capability_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-cli_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-cli_git.bb new file mode 100644 index 000000000..21d01ac35 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-cli_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "A small package for building command line apps in Go" +HOMEPAGE = "https://github.com/codegangsta/cli" +SECTION = "devel/go" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ed9b539ed65d73926f30ff1f1587dc44" + +SRCNAME = "cli" + +PKG_NAME = "github.com/codegangsta/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "27ecc97192df1bf053a22b04463f2b51b8b8373e" +PV = "1.1.0+git${SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_cli_sysroot_preprocess" + +go_cli_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-context_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-context_git.bb new file mode 100644 index 000000000..15f6a8dd3 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-context_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "A golang registry for global request variables." +HOMEPAGE = "https://github.com/gorilla/context" +SECTION = "devel/go" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f" + +SRCNAME = "context" + +PKG_NAME = "github.com/gorilla/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "14f550f51af52180c2eefed15e5fd18d63c0a64a" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_context_sysroot_preprocess" + +go_context_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb new file mode 100644 index 000000000..092bd5028 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-dbus_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Native Go bindings for D-Bus" +HOMEPAGE = "https://github.com/godbus/dbus" +SECTION = "devel/go" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b5ac622301483800715d770434e27e5b" + +SRCNAME = "dbus" + +PKG_NAME = "github.com/godbus/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "88765d85c0fdadcd98a54e30694fa4e4f5b51133" +PV = "2+git${SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_dbus_sysroot_preprocess" + +go_dbus_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb new file mode 100644 index 000000000..31d724ce3 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-distribution-digest_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "The Docker toolset to pack, ship, store, and deliver content" +HOMEPAGE = "https://github.com/docker/distribution" +SECTION = "devel/go" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" + +SRCNAME = "distribution" + +PKG_NAME = "github.com/docker/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "d957768537c5af40e4f4cd96871f7b2bde9e2923" + +S = "${WORKDIR}/git" + +do_unpackpost() { + rm -rf ${S}/[A-KM-Za-ce-z]* ${S}/doc* +} + +addtask unpackpost after do_unpack before do_patch + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_distribution_digeset_sysroot_preprocess" + +go_distribution_digeset_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb new file mode 100644 index 000000000..e18f574a8 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-fsnotify_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "A golang registry for global request variables." +HOMEPAGE = "https://github.com/go-fsnotify/fsnotify" +SECTION = "devel/go" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c38914c9a7ab03bb2b96d4baaee10769" + +SRCNAME = "fsnotify" + +PKG_NAME = "github.com/go-fsnotify/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "ca50e738d35a862c379baf8fffbc3bfd080b3cff" +PV = "1.0.4+git${SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_fsnotify_sysroot_preprocess" + +go_fsnotify_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb new file mode 100644 index 000000000..f2acfb436 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-libtrust_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Primitives for identity and authorization" +HOMEPAGE = "https://github.com/docker/libtrust" +SECTION = "devel/go" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8" + +SRCNAME = "libtrust" + +PKG_NAME = "github.com/docker/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "230dfd18c2326f1e9d08238710e67a1040187d07" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_libtrust_sysroot_preprocess" + +go_libtrust_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb new file mode 100644 index 000000000..082c1a689 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-logrus_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "A golang registry for global request variables." +HOMEPAGE = "https://github.com/Sirupsen/logrus" +SECTION = "devel/go" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8dadfef729c08ec4e631c4f6fc5d43a0" + +SRCNAME = "logrus" + +PKG_NAME = "github.com/Sirupsen/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "3fc34d061b9c78a70db853c7cb6b0576b6d4f32d" +PV = "0.7.1+git${SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_logrus_sysroot_preprocess" + +go_logrus_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-mux_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-mux_git.bb new file mode 100644 index 000000000..7a2025a07 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-mux_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "A powerful URL router and dispatcher for golang." +HOMEPAGE = "https://github.com/gorilla/mux" +SECTION = "devel/go" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f" + +SRCNAME = "mux" + +PKG_NAME = "github.com/gorilla/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "136d54f81f00414c45c3c68dd47e98cc97519c5e" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_mux_sysroot_preprocess" + +go_mux_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb new file mode 100644 index 000000000..18c188d32 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-patricia_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "A generic patricia trie (also called radix tree) implemented in Go (Golang)" +HOMEPAGE = "https://github.com/gorilla/context" +SECTION = "devel/go" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9949b99212edd6b1e24ce702376c3baf" + +SRCNAME = "go-patricia" + +PKG_NAME = "github.com/tchap/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "f64d0a63cd3363481c898faa9339de04d12213f9" +PV = "1.0.1+git${SRCPV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_patricia_sysroot_preprocess" + +go_patricia_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-pty_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-pty_git.bb new file mode 100644 index 000000000..bc94b3170 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-pty_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "PTY interface for Go" +HOMEPAGE = "https://github.com/kr/pty" +SECTION = "devel/go" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://License;md5=93958070863d769117fa33b129020050" + +SRCNAME = "pty" + +PKG_NAME = "github.com/kr/${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "05017fcccf23c823bfdea560dcc958a136e54fb7" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_pty_sysroot_preprocess" + +go_pty_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb b/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb new file mode 100644 index 000000000..358e6bb42 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/go/go-systemd_git.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Go bindings to systemd socket activation, journal, D-Bus, and unit files" +HOMEPAGE = "https://github.com/coreos/go-systemd" +SECTION = "devel/go" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=19cbd64715b51267a47bf3750cc6a8a5" + +SRCNAME = "systemd" + +PKG_NAME = "github.com/coreos/go-${SRCNAME}" +SRC_URI = "git://${PKG_NAME}.git" + +SRCREV = "f743bc15d6bddd23662280b4ad20f7c874cdd5ad" +PV = "2+git${SRCREV}" + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}${prefix}/local/go/src/${PKG_NAME} + cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/ +} + +SYSROOT_PREPROCESS_FUNCS += "go_systemd_sysroot_preprocess" + +go_systemd_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME} + cp -r ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME}) +} + +FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*" diff --git a/import-layers/meta-virtualization/recipes-devtools/python/gunicorn_19.1.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/gunicorn_19.1.1.bb new file mode 100644 index 000000000..bbe03ea35 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/gunicorn_19.1.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "WSGI HTTP Server for UNIX" +DESCRIPTION = "\ + Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX. It’s \ + a pre-fork worker model ported from Ruby’s Unicorn project. The \ + Gunicorn server is broadly compatible with various web frameworks, \ + simply implemented, light on server resource usage, and fairly speedy. \ + " +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=19a2e253a273e390cd1b91d19b6ee236" + +SRC_URI = "https://pypi.python.org/packages/source/g/gunicorn/${PN}-${PV}.tar.gz" +SRC_URI[md5sum] = "eaa72bff5341c05169b76ce3dcbb8140" +SRC_URI[sha256sum] = "82715511fb6246fad4ba66d812eb93416ae8371b464fa88bf3867c9c177daa14" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma/fix_paths.patch b/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma/fix_paths.patch new file mode 100644 index 000000000..c2b374f63 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma/fix_paths.patch @@ -0,0 +1,17 @@ +--- + setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/setup.py ++++ b/setup.py +@@ -32,8 +32,8 @@ + extens = [Extension('backports/lzma/_lzma', + ['backports/lzma/_lzmamodule.c'], + libraries = ['lzma'], +- include_dirs = [os.path.join(home, 'include'), '/opt/local/include', '/usr/local/include'], +- library_dirs = [os.path.join(home, 'lib'), '/opt/local/lib', '/usr/local/lib'] ++ include_dirs = [], ++ library_dirs = [] + )] + + descr = "Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files." diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma_0.0.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma_0.0.3.bb new file mode 100644 index 000000000..a3586c04b --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-backports-lzma_0.0.3.bb @@ -0,0 +1,32 @@ +HOMEPAGE = "https://github.com/peterjc/backports.lzma" +SUMMARY = "\ + Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files." +DESCRIPTION = "\ + This is a backport of the 'lzma' module included in Python 3.3 or later \ + by Nadeem Vawda and Per Oyvind Karlsen, which provides a Python wrapper \ + for XZ Utils (aka LZMA Utils v2) by Igor Pavlov. \ + . \ + In order to compile this, you will need to install XZ Utils from \ + http://tukaani.org/xz/ \ + " +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=db4345b3b9524aabc8fe8c65f235c6b2" + +SRC_URI[md5sum] = "c3d109746aefa86268e500c07d7e8e0f" +SRC_URI[sha256sum] = "bac58aec8d39ac3d22250840fb24830d0e4a0ef05ad8f3f09172dc0cc80cdbca" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +DEPENDS += "xz" + +SRCNAME = "backports.lzma" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI = "\ + https://pypi.python.org/packages/source/b/backports.lzma/${SRCNAME}-${PV}.tar.gz \ + file://fix_paths.patch \ + " diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb new file mode 100644 index 000000000..24e19b501 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-blinker_1.3.bb @@ -0,0 +1,22 @@ +HOMEPAGE = "https://pypi.python.org/pypi/blinker" +SUMMARY = "Fast, simple object-to-object and broadcast signaling" +DESCRIPTION = " \ + Blinker provides a fast dispatching system that allows any number of \ + interested parties to subscribe to events, or “signals”. \ + . \ + Signal receivers can subscribe to specific senders or receive signals \ + sent by any sender. \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8baf1d53a00de619f60052e4752a89af" + +SRCNAME = "blinker" +SRC_URI = "https://pypi.python.org/packages/source/b/blinker/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "66e9688f2d287593a0e698cd8a5fbc57" +SRC_URI[sha256sum] = "6811010809262261e41ab7b92f3f6d23f35cf816fbec2bc05077992eebec6e2f" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-boto_2.34.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-boto_2.34.0.bb new file mode 100644 index 000000000..f94f32445 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-boto_2.34.0.bb @@ -0,0 +1,25 @@ +HOMEPAGE = "https://github.com/boto/boto" +SUMMARY = "Amazon Web Services API" +DESCRIPTION = "\ + Boto is a Python package that provides interfaces to Amazon Web Services. \ + Currently, all features work with Python 2.6 and 2.7. Work is under way to \ + support Python 3.3+ in the same codebase. Modules are being ported one at \ + a time with the help of the open source community, so please check below \ + for compatibility with Python 3.3+. \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://setup.py;md5=182ef81236d3fac2c6ed8e8d3c988ec8" + +PR = "r0" +SRCNAME = "boto" + +SRC_URI = "https://pypi.python.org/packages/source/b/boto/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "5556223d2d0cc4d06dd4829e671dcecd" +SRC_URI[sha256sum] = "33baab022ecb803414ad0d6cf4041d010cfc2755ff8acc3bea7b32e77ba98be0" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-bugsnag_2.0.2.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-bugsnag_2.0.2.bb new file mode 100644 index 000000000..edf880fb4 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-bugsnag_2.0.2.bb @@ -0,0 +1,26 @@ +HOMEPAGE = "https://bugsnag.com/" +SUMMARY = "Automatic error monitoring for django, flask, etc." +DESCRIPTION = "\ + The official Python notifier for `Bugsnag <https://bugsnag.com/>`_. \ + Provides support for automatically capturing and sending exceptions \ + in your Django and other Python apps to Bugsnag, to help you find \ + and solve your bugs as fast as possible. \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=f6df6ab9f1b615a140ebb2a48f61bddc" + +PR = "r0" +SRCNAME = "bugsnag" + +SRC_URI = "https://pypi.python.org/packages/source/b/bugsnag/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "e16360d86979890892cd388635f213e7" +SRC_URI[sha256sum] = "093934b3cd1d36ba2b89cfe1673b14ba59043417fe500a02dbf6de0df43ea962" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +DEPENDS += "python-webob python-flask python-blinker" + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-docker-registry-core_2.0.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-docker-registry-core_2.0.3.bb new file mode 100644 index 000000000..7aa6825e7 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-docker-registry-core_2.0.3.bb @@ -0,0 +1,29 @@ +HOMEPAGE = "https://pypi.python.org/pypi/docker-registry-core" +SUMMARY = "Docker registry core package" +DESCRIPTION = "core package for docker-registry (drivers) developers" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCNAME = "docker-registry-core" + +SRC_URI = "https://pypi.python.org/packages/source/d/docker-registry-core/${SRCNAME}-${PV}.tar.gz" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +SRC_URI[md5sum] = "610ef9395f2e9a2f91c68d13325fce7b" +SRC_URI[sha256sum] = "347e804f1f35b28dbe27bf8d7a0b630fca29d684032139bf26e3940572360360" + +inherit setuptools + +DEPENDS += "\ + python-distribute \ + python-boto (= 2.34.0) \ + python-redis (= 2.10.3) \ + python-simplejson (= 3.6.2) \ + " + +# boto 2.34.0 +# redis 2.10.3 +# simplejson 3.6.2 +# setuptools 5.8 diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-flask-cors_1.10.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-flask-cors_1.10.3.bb new file mode 100644 index 000000000..c39e9b263 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-flask-cors_1.10.3.bb @@ -0,0 +1,22 @@ +HOMEPAGE = "https://pypi.python.org/pypi/Flask-Cors/1.10.3" +SUMMARY = "A Flask extension adding a decorator for CORS support" +DESCRIPTION = "\ + A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4784781a5ee9fed9c50272e733e07685" + +DEPENDS += "python-six python-flask" + +PR = "r0" +SRCNAME = "Flask-Cors" + +SRC_URI = "https://pypi.python.org/packages/source/F/Flask-Cors/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "4f3c75ace0f724d1de167bd73745c965" +SRC_URI[sha256sum] = "9e6927aa0a46f314bca0ec63eb871cee898a162adfdd5b65224db7a008287423" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-flask_0.10.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-flask_0.10.1.bb new file mode 100644 index 000000000..263e53d02 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-flask_0.10.1.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "A microframework based on Werkzeug, Jinja2 and good intentions" +HOMEPAGE = "https://pypi.python.org/pypi/Flask/" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=79aa8b7bc4f781210d6b5c06d6424cb0" + +PR = "r0" +SRCNAME = "Flask" + +SRC_URI = "https://pypi.python.org/packages/source/F/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "378670fe456957eb3c27ddaef60b2b24" +SRC_URI[sha256sum] = "4c83829ff83d408b5e1d4995472265411d2c414112298f2eb4b359d9e4563373" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +CLEANBROKEN = "1" + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/gevent-allow-ssl-v2-or-v3-certificates.patch b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/gevent-allow-ssl-v2-or-v3-certificates.patch new file mode 100644 index 000000000..623d04f09 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/gevent-allow-ssl-v2-or-v3-certificates.patch @@ -0,0 +1,29 @@ +From c2dc97478fcc3757e09d5d2997391960a8351d53 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Sun, 29 Mar 2015 22:34:28 -0400 +Subject: [PATCH] gevent: allow ssl v2 or v3 certificates + +Work around an issue with python 2.7 not always having SSLv3 available +by allowing v2 or v3 certificates. + +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +--- + gevent/ssl.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gevent/ssl.py b/gevent/ssl.py +index ce6434718d1b..93c0d642da5f 100644 +--- a/gevent/ssl.py ++++ b/gevent/ssl.py +@@ -383,7 +383,7 @@ def wrap_socket(sock, keyfile=None, certfile=None, + ciphers=ciphers) + + +-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None): ++def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): + """Retrieve the certificate from the server at the specified address, + and return it as a PEM-encoded string. + If 'ca_certs' is specified, validate the server cert against it. +-- +1.9.1 + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/libev-conf.patch b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/libev-conf.patch new file mode 100644 index 000000000..283705f80 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent/libev-conf.patch @@ -0,0 +1,19 @@ +Due to differences in library locations, the cross compile test can fail because it can't run +the conftest binary (dynamically linked). Building it statically instead. + +Signed-off-by: Amy Fong <amy.fong@windriver.com> +--- + libev/configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libev/configure ++++ b/libev/configure +@@ -2730,7 +2730,7 @@ + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_link='$CC -static -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb new file mode 100644 index 000000000..47f1267ab --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-gevent_1.0.1.bb @@ -0,0 +1,33 @@ +HOMEPAGE = "http://www.gevent.org" +SUMMARY = "A coroutine-based Python networking library" +DESCRIPTION = "\ + gevent is a coroutine-based Python networking library that uses greenlet \ + to provide a high-level synchronous API on top of the libevent event \ + loop. \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2dbb33d00e1fd31c7041460a81ac0bd2" +DEPENDS += "python-greenlet libevent" +RDEPENDS_${PN} += "python-greenlet python-mime python-pprint python-re" + +SRCNAME = "gevent" + +SRC_URI = "http://pypi.python.org/packages/source/g/gevent/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "7b952591d1a0174d6eb6ac47bd975ab6" +SRC_URI[sha256sum] = "4627e215d058f71d95e6b26d9e7be4c263788a4756bd2858a93775f6c072df43" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += "file://libev-conf.patch" +SRC_URI += "file://gevent-allow-ssl-v2-or-v3-certificates.patch" + +# The python-gevent has no autoreconf ability +# and the logic for detecting a cross compile is flawed +# so always force a cross compile +do_configure_append() { + sed -i -e 's/^cross_compiling=no/cross_compiling=yes/' ${S}/libev/configure +}
\ No newline at end of file diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-itsdangerous_0.24.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-itsdangerous_0.24.bb new file mode 100644 index 000000000..3e229f8fe --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-itsdangerous_0.24.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Various helpers to pass trusted data to untrusted environments and back" +HOMEPAGE = "https://pypi.python.org/pypi/itsdangerous/" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b61841e2bf5f07884148e2a6f1bcab0c" + +PR = "r0" +SRCNAME = "itsdangerous" + +SRC_URI = "https://pypi.python.org/packages/source/i/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "a3d55aa79369aef5345c036a8a26307f" +SRC_URI[sha256sum] = "cbb3fcf8d3e33df861709ecaf89d9e6629cff0a217bc2848f1b41cd30d360519" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} += "python-json python-netclient python-zlib python-datetime python-lang python-crypt" + +CLEANBROKEN = "1" + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto/m2crypto-Fix-build-with-SWIG-3.0.5.patch b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto/m2crypto-Fix-build-with-SWIG-3.0.5.patch new file mode 100644 index 000000000..c40859521 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto/m2crypto-Fix-build-with-SWIG-3.0.5.patch @@ -0,0 +1,158 @@ +From 8430e7202407fb1a0a104b0decdcc9da9e41a52b Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Mon, 4 Apr 2016 23:28:15 -0400 +Subject: [PATCH] Fix build with SWIG 3.0.5 + +See analysis and previous patches in +https://github.com/martinpaljak/M2Crypto/issues/60 and +https://github.com/swig/swig/issues/344, in particular this adds the +build machinery to patch +https://github.com/martinpaljak/M2Crypto/issues/60#issuecomment-75735489 + +Fixes #47 + +Author: Miloslav Trmac <mitr@redhat.com> + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + M2Crypto/__init__.py | 4 ++-- + M2Crypto/m2.py | 2 +- + SWIG/_lib.i | 4 ++++ + SWIG/_pkcs7.i | 1 + + setup.py | 24 ++++++++++++++++++++++++ + 5 files changed, 32 insertions(+), 3 deletions(-) + +diff --git a/M2Crypto/__init__.py b/M2Crypto/__init__.py +index 647e057..280af94 100644 +--- a/M2Crypto/__init__.py ++++ b/M2Crypto/__init__.py +@@ -19,7 +19,7 @@ Copyright 2008-2011 Heikki Toivonen. All rights reserved. + version_info = (0, 22) + version = '.'.join([str(_v) for _v in version_info]) + +-import __m2crypto ++import _m2crypto + import m2 + import ASN1 + import AuthCookie +@@ -47,4 +47,4 @@ import m2xmlrpclib + import threading + import util + +-__m2crypto.lib_init() ++_m2crypto.lib_init() +diff --git a/M2Crypto/m2.py b/M2Crypto/m2.py +index e4bb695..822143f 100644 +--- a/M2Crypto/m2.py ++++ b/M2Crypto/m2.py +@@ -25,7 +25,7 @@ Portions created by Open Source Applications Foundation (OSAF) are + Copyright (C) 2004 OSAF. All Rights Reserved. + """ + +-from __m2crypto import * ++from _m2crypto import * + lib_init() + + +diff --git a/SWIG/_lib.i b/SWIG/_lib.i +index 0d40698..6cc1a44 100644 +--- a/SWIG/_lib.i ++++ b/SWIG/_lib.i +@@ -66,6 +66,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) { + int cret; + int new_style_callback = 0, warning_raised_exception=0; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + ssl = (SSL *)X509_STORE_CTX_get_app_data(ctx); + +@@ -151,6 +152,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) { + void ssl_info_callback(const SSL *s, int where, int ret) { + PyObject *argv, *retval, *_SSL; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +@@ -170,6 +172,7 @@ DH *ssl_set_tmp_dh_callback(SSL *ssl, int is_export, int keylength) { + PyObject *argv, *ret, *_ssl; + DH *dh; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +@@ -193,6 +196,7 @@ RSA *ssl_set_tmp_rsa_callback(SSL *ssl, int is_export, int keylength) { + PyObject *argv, *ret, *_ssl; + RSA *rsa; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +diff --git a/SWIG/_pkcs7.i b/SWIG/_pkcs7.i +index 22d791a..20dfbaf 100644 +--- a/SWIG/_pkcs7.i ++++ b/SWIG/_pkcs7.i +@@ -157,6 +157,7 @@ PyObject *smime_read_pkcs7(BIO *bio) { + BIO *bcont = NULL; + PKCS7 *p7; + PyObject *tuple, *_p7, *_BIO; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (BIO_method_type(bio) == BIO_TYPE_MEM) { + /* OpenSSL FAQ explains that this is needed for mem BIO to return EOF, +diff --git a/setup.py b/setup.py +index bac6f9f..f59dc18 100644 +--- a/setup.py ++++ b/setup.py +@@ -19,6 +19,7 @@ from setuptools.command import build_ext + + from distutils.core import Extension + from distutils.spawn import find_executable ++from distutils.file_util import copy_file + + + class _M2CryptoBuildExt(build_ext.build_ext): +@@ -77,6 +78,15 @@ class _M2CryptoBuildExt(build_ext.build_ext): + [opensslIncludeDir, os.path.join(opensslIncludeDir, "openssl")]] + self.swig_opts.append('-includeall') + self.swig_opts.append('-modern') ++ self.swig_opts.append('-builtin') ++ ++ # These two lines are a workaround for ++ # http://bugs.python.org/issue2624 , hard-coding that we are only ++ # building a single extension with a known path; a proper patch to ++ # distutils would be in the run phase, when extension name and path are ++ # known. ++ self.swig_opts.append('-outdir') ++ self.swig_opts.append(os.path.join(self.build_lib, 'M2Crypto')) + + # Fedora does hat tricks. + if platform.linux_distribution()[0] in ['Fedora', 'CentOS']: +@@ -98,6 +108,20 @@ class _M2CryptoBuildExt(build_ext.build_ext): + + self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)] + ++ def run(self): ++ '''Overloaded build_ext implementation to allow inplace=1 to work, ++ which is needed for (python setup.py test).''' ++ # This is another workaround for http://bugs.python.org/issue2624 + the ++ # corresponding lack of support in setuptools' test command. Note that ++ # just using self.inplace in finalize_options() above does not work ++ # because swig is not rerun if the __m2crypto.so extension exists. ++ # Again, hard-coding our extension name and location. ++ build_ext.build_ext.run(self) ++ if self.inplace: ++ copy_file(os.path.join(self.build_lib, 'M2Crypto', '_m2crypto.py'), ++ os.path.join('M2Crypto', '_m2crypto.py'), ++ verbose=self.verbose, dry_run=self.dry_run) ++ + if sys.platform == 'darwin': + my_extra_compile_args = ["-Wno-deprecated-declarations"] + else: +-- +1.9.1 + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb new file mode 100644 index 000000000..95d6eecf4 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-m2crypto_0.22.3.bb @@ -0,0 +1,62 @@ +HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto" +SUMMARY = "A Python crypto and SSL toolkit" +DESCRIPTION = "\ + M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, \ + DSA, DH, EC, HMACs, message digests, symmetric ciphers (including \ + AES); SSL functionality to implement clients and servers; HTTPS \ + extensions to Python's httplib, urllib, and xmlrpclib; unforgeable \ + HMAC'ing AuthCookies for web session management; FTP/TLS client and \ + server; S/MIME; ZServerSSL: A HTTPS server for Zope and ZSmime: An \ + S/MIME messenger for Zope. M2Crypto can also be used to provide SSL \ + for Twisted. \ + " +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://PKG-INFO;md5=0ccca7097c1d29fa42e75e9c15c6ff2e" + +SRCNAME = "M2Crypto" +SRC_URI = "http://pypi.python.org/packages/source/M/M2Crypto/${SRCNAME}-${PV}.tar.gz \ + file://m2crypto-Fix-build-with-SWIG-3.0.5.patch \ +" + +SRC_URI[md5sum] = "573f21aaac7d5c9549798e72ffcefedd" +SRC_URI[sha256sum] = "6071bfc817d94723e9b458a010d565365104f84aa73f7fe11919871f7562ff72" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +DEPENDS += "openssl swig-native" + +DISTUTILS_BUILD_ARGS += "build_ext -I${STAGING_INCDIR}" + +inherit setuptools + +SWIG_FEATURES_x86-64 = "-D__x86_64__" +SWIG_FEATURES ?= "" +export SWIG_FEATURES + +# Get around a problem with swig, but only if the +# multilib header file exists. +# +do_compile_prepend() { + sed -i -e 's/self.add_multiarch_paths.*$/# &/;' ${S}/setup.py + sed -i -e 's/opensslIncludeDir = .*$/opensslIncludeDir = os.getenv("STAGING_INCDIR")/;' ${S}/setup.py + sed -i -e 's/opensslLibraryDir = .*$/opensslLibraryDir = os.getenv("STAGING_LIBDIR")/;' ${S}/setup.py + + if [ "${SITEINFO_BITS}" = "64" ];then + bit="64" + else + bit="32" + fi + + if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ]; then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "$i" + done + elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "$i" + done + fi +} + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-newrelic_2.22.0.19.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-newrelic_2.22.0.19.bb new file mode 100644 index 000000000..389182494 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-newrelic_2.22.0.19.bb @@ -0,0 +1,26 @@ +HOMEPAGE = "http://www.newrelic.com" +SUMMARY = "New Relic Python Agent" +DESCRIPTION = "\ + Python agent for the New Relic web application performance monitoring \ + service. Check the release notes for what has changed in this version. \ + " +SECTION = "devel/python" +LICENSE = "BSD-3-Clause & MIT & Python-2.0 & BSD-2-Clause & NewRelic" +LIC_FILES_CHKSUM = "file://newrelic/LICENSE;md5=0f6cc160a8ed6759faa408a30b6ac978" + +PR = "r0" +SRCNAME = "newrelic" + +SRC_URI = "https://pypi.python.org/packages/source/n/newrelic/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "f8c9bf996d040a11847d14682b290eff" +SRC_URI[sha256sum] = "aa8869413c21aff441a77582df1e0fdc0f67342760eb7560d33ed3bbed7edf7b" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +FILES_${PN}-dbg += "\ + ${PYTHON_SITEPACKAGES_DIR}/newrelic-${PV}/newrelic/*/.debug \ + ${PYTHON_SITEPACKAGES_DIR}/newrelic-${PV}/newrelic/packages/*/.debug/ \ + " diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb new file mode 100644 index 000000000..cb1db8c60 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-pyyaml_3.11.bb @@ -0,0 +1,30 @@ +HOMEPAGE = "http://www.pyyaml.org" +SUMMARY = "Python support for YAML" +DESCRIPTION = "\ + YAML is a data serialization format designed for human readability \ + and interaction with scripting languages. PyYAML is a YAML parser \ + and emitter for Python. \ + . \ + PyYAML features a complete YAML 1.1 parser, Unicode support, pickle \ + support, capable extension API, and sensible error messages. PyYAML \ + supports standard YAML tags and provides Python-specific tags that \ + allow to represent an arbitrary Python object. \ + . \ + PyYAML is applicable for a broad range of tasks from complex \ + configuration files to object serialization and persistance. \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17" + +SRCNAME = "PyYAML" +SRC_URI = "http://pyyaml.org/download/pyyaml/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "f50e08ef0fe55178479d3a618efe21db" +SRC_URI[sha256sum] = "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +DEPENDS += "libyaml python-cython-native" diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb new file mode 100644 index 000000000..9eda8a5c8 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-redis_2.10.3.bb @@ -0,0 +1,20 @@ +HOMEPAGE = "https://pypi.python.org/pypi/redis/" +SUMMARY = "Python client for Redis key-value store" +DESCRIPTION = "The Python interface to the Redis key-value store." +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=51d9ad56299ab60ba7be65a621004f27" + +PR = "r0" +SRCNAME = "redis" + +SRC_URI = "https://pypi.python.org/packages/source/r/redis/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "7619221ad0cbd124a5687458ea3f5289" +SRC_URI[sha256sum] = "a4fb37b02860f6b1617f6469487471fd086dd2d38bbce640c2055862b9c4019c" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "redis" diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-requests_2.8.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-requests_2.8.1.bb new file mode 100644 index 000000000..187f97ae8 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-requests_2.8.1.bb @@ -0,0 +1,28 @@ +HOMEPAGE = "http://python-requests.org" +SUMMARY = "Python HTTP for Humans." +DESCRIPTION = "\ + Requests is an Apache2 Licensed HTTP library, written in Python, \ + for human beings. \ + . \ + Most existing Python modules for sending HTTP requests are extremely \ + verbose and cumbersome. Python's builtin urllib2 module provides most \ + of the HTTP capabilities you should need, but the api is thoroughly \ + broken. It requires an enormous amount of work (even method overrides) \ + to perform the simplest of tasks. \ + . \ + Things shouldn't be this way. Not in Python \ + " +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=58c7e163c9f8ee037246da101c6afd1e" + +SRCNAME = "requests" + +SRC_URI = "http://pypi.python.org/packages/source/r/requests/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "a27ea3d72d7822906ddce5e252d6add9" +SRC_URI[sha256sum] = "84fe8d5bf4dcdcc49002446c47a146d17ac10facf00d9086659064ac43b6c25b" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-simplejson_3.7.3.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-simplejson_3.7.3.bb new file mode 100644 index 000000000..39dfce614 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-simplejson_3.7.3.bb @@ -0,0 +1,31 @@ +HOMEPAGE = "http://cheeseshop.python.org/pypi/simplejson" +SUMMARY = "Simple, fast, extensible JSON encoder/decoder for Python" +DESCRIPTION = "\ + JSON <http://json.org> encoder and decoder for Python 2.5+ \ + and Python 3.3+. It is pure Python code with no dependencies, \ + but includes an optional C extension for a serious speed boost \ + " +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c6338d7abd321c0b50a2a547e441c52e" +PR = "r0" + +SRCNAME = "simplejson" + +SRC_URI = "https://pypi.python.org/packages/source/s/simplejson/${SRCNAME}-${PV}.tar.gz" +SRC_URI[md5sum] = "117346e5ee4ed4434ffe485f8e58f5ed" +SRC_URI[sha256sum] = "63d7f7b14a20f29f74325a69e6db45925eaf6e3a003eab46c0234fd050a8c93f" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-re \ + python-io \ + python-netserver \ + python-numbers \ +" + + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb new file mode 100644 index 000000000..a84a4c495 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-six_1.10.0.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Python 2 and 3 compatibility utilities" +HOMEPAGE = "http://pypi.python.org/pypi/six/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6f00d4a50713fa859858dd9abaa35b21" + +SRCNAME = "six" + +SRC_URI = "https://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ +" + +SRC_URI[md5sum] = "34eed507548117b2ab523ab14b2f8b55" +SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb new file mode 100644 index 000000000..fe8ad94a3 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sphinx_1.3.1.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Python documentation generator" +HOMEPAGE = "http://sphinx-doc.org/" +SECTION = "devel/python" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6dd095eaa1e7a662b279daf80ecad7e6" + +PR = "r0" +SRCNAME = "Sphinx" + +SRC_URI = "http://pypi.python.org/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "8786a194acf9673464c5455b11fd4332" +SRC_URI[sha256sum] = "1a6e5130c2b42d2de301693c299f78cc4bd3501e78b610c08e45efc70e2b5114" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb new file mode 100644 index 000000000..2d66ffd35 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-sqlalchemy_1.0.8.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \ +application developers the full power and flexibility of SQL" +HOMEPAGE = "http://www.sqlalchemy.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cf755cb27ad4331d45dbb4db5172fd33" +RDEPENDS_${PN} += "python-numbers" + +SRCNAME = "SQLAlchemy" +SRC_URI = "https://pypi.python.org/packages/source/S/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "7cfd005be63945c96a78c67764ac3a85" +SRC_URI[sha256sum] = "950c79c0abf9e9f99c43c627c51d40d14a946810a90c35e7cd827bfd0bffe46f" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb new file mode 100644 index 000000000..18b380663 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-webob_1.4.1.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "WSGI request and response object" +HOMEPAGE = "http://webob.org/" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://docs/license.txt;md5=8ed3584bcc78c16da363747ccabc5af5" + +PR = "r0" +SRCNAME = "WebOb" + +SRC_URI = "http://pypi.python.org/packages/source/W/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "a5c6e8ba5431756e6a5d5ec56047ec94" +SRC_URI[sha256sum] = "12f8b98390befc47336d2c0e5bad9cc48609d808eabb3f8675dc1027a3a9e9db" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} += " \ + python-sphinx \ + python-nose \ + " + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb b/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb new file mode 100644 index 000000000..763e5b987 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python-werkzeug_0.10.4.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "The Swiss Army knife of Python web development" +HOMEPAGE = "https://pypi.python.org/pypi/Werkzeug/" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a68f5361a2b2ca9fdf26b38aaecb6faa" + +PR = "r0" +SRCNAME = "Werkzeug" + +SRC_URI = "https://pypi.python.org/packages/source/W/${SRCNAME}/${SRCNAME}-${PV}.tar.gz" + +SRC_URI[md5sum] = "66a488e0ac50a9ec326fe020b3083450" +SRC_URI[sha256sum] = "9d2771e4c89be127bc4bac056ab7ceaf0e0064c723d6b6e195739c3af4fd5c1d" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} += "python-io \ + python-datetime \ + python-email \ + python-zlib \ + python-pkgutil \ + python-html \ + python-shell \ + python-pprint \ + python-subprocess \ + python-netserver" + +CLEANBROKEN = "1" + diff --git a/import-layers/meta-virtualization/recipes-devtools/python/python_2.%.bbappend b/import-layers/meta-virtualization/recipes-devtools/python/python_2.%.bbappend new file mode 100644 index 000000000..55301c7e4 --- /dev/null +++ b/import-layers/meta-virtualization/recipes-devtools/python/python_2.%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEPENDS += " ncurses" + +do_compile_prepend() { + export LIBRARY_PATH=${STAGING_DIR_TARGET}/lib +} + |