Skip to content

Commit

Permalink
start of depends
Browse files Browse the repository at this point in the history
  • Loading branch information
akva2 committed Jul 4, 2016
1 parent 57c36b6 commit 7bf2298
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 0 deletions.
1 change: 1 addition & 0 deletions FindRTMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if(PKG_CONFIG_FOUND)
else()
find_path(RTMP_INCLUDE_DIRS librtmp/rtmp.h)
find_library(RTMP_LIBRARIES rtmp)
list(APPEND RTMP_LIBRARIES ssl crypto z)
endif()

include(FindPackageHandleStandardArgs)
Expand Down
10 changes: 10 additions & 0 deletions depends/common/librtmp/0001-prefix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- librtmp/Makefile 2010-06-30 15:58:35.000000000 -0400
+++ librtmp/Makefile.2 2011-03-31 16:19:52.813884882 -0400
@@ -1,6 +1,6 @@
VERSION=v2.4

-prefix=/usr/local
+prefix=$(PREFIX)

CC=$(CROSS_COMPILE)gcc
LD=$(CROSS_COMPILE)ld
13 changes: 13 additions & 0 deletions depends/common/librtmp/0002-compilers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- librtmp/Makefile.old 2016-06-20 12:40:21.179754807 +0200
+++ librtmp/Makefile 2016-06-20 12:40:54.233259590 +0200
@@ -2,8 +2,8 @@

prefix=/usr/local

-CC=$(CROSS_COMPILE)gcc
-LD=$(CROSS_COMPILE)ld
+#CC=$(CROSS_COMPILE)gcc
+#LD=$(CROSS_COMPILE)ld

SYS=posix
#SYS=mingw
19 changes: 19 additions & 0 deletions depends/common/librtmp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
project(librtmp)

cmake_minimum_required(VERSION 2.8)
set(SYS posix)
if(CORE_SYSTEM_NAME MATCHES "osx" OR
CORE_SYSTEM_NAMES MATCHES "ios")
set(SYS darwin)
endif()

include(ExternalProject)
externalproject_add(librtmp
SOURCE_DIR ${CMAKE_SOURCE_DIR}
CONFIGURE_COMMAND ""
BUILD_COMMAND cd <SOURCE_DIR> && make -C librtmp SHARED= prefix=${OUTPUT_DIR} SYS=${SYS} XCFLAGS=-fpic
INSTALL_COMMAND "")

install(CODE "execute_process(COMMAND make -C librtmp install
prefix=${OUTPUT_DIR} SYS=${SYS} XCFLAGS=-fpic SHARED=
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
1 change: 1 addition & 0 deletions depends/common/librtmp/deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openssl
1 change: 1 addition & 0 deletions depends/common/librtmp/librtmp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
librtmp http://mirrors.xbmc.org/build-deps/sources/rtmpdump-fa8646daeb19dfd12c181f7d19de708d623704c0.tar.gz
49 changes: 49 additions & 0 deletions depends/common/openssl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
project(openssl)

cmake_minimum_required(VERSION 2.8)

include(ExternalProject)

set(configure_command MACHINE=${PLATFORM} <SOURCE_DIR>/config no-shared zlib)

if(CORE_SYSTEM_NAME MATCHES "android")
set(configure_command <SOURCE_DIR>/Configure shared zlib
--openssldir=${OUTPUT_DIR}
--with-zlib-include=${OUTPUT_DIR}/include
--with-zlib-dir=${OUTPUT_DIR}/lib

This comment has been minimized.

Copy link
@wsnipex

wsnipex Sep 4, 2016

Member

I think this should be --with-zlib-lib
error from jenkins:

make[9]: Entering directory `/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-17/build/openssl/src/openssl/crypto'
gcc: error: unrecognized command line option '--with-zlib-dir=/home/jenkins/workspace/Android-ARM/tools/depends/target/binary-addons/arm-linux-androideabi-android-17/build/depends/lib'

This comment has been minimized.

Copy link
@akva2

akva2 Sep 5, 2016

Author Contributor

indeed. not sure how i ended up mangling that one, fixed.

linux-generic32)
endif()

if(CORE_SYSTEM_NAME MATCHES "ios")
set(configure_command CC=${CMAKE_COMPILER} AR=${CMAKE_AR} <SOURCE_DIR>/Configure iphoneos-cross zlib no-asm no-krb5 --openssldir=${OUTPUT_DIR})
set(build_command && sed -ie "s|CFLAG= |CFLAG=${CMAKE_CC_FLAGS} |" ${PROJECT_SOURCE_DIR}/Makefile
&& sed -ie "s|-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) ||" ${PROJECT_SOURCE_DIR}/Makefile

This comment has been minimized.

Copy link
@fetzerch

fetzerch Aug 13, 2016

Member

I've tried to build the addon locally for ios but ran into quite a few issues. they could be local to my setup though and I'm not sure how fast I get them sorted out. For the moment: can you change that line here to s|-isysroot $.CROSS_TOP./SDKs/$.CROSS_SDK. then I can trigger another jenkins run.
For some reason when cmake calls the shell, it tries to expand the vars. I've tried escaping with all kind of escape chars ($ and ) but that didn't help.

This comment has been minimized.

Copy link
@notspiff

notspiff via email Aug 13, 2016

Collaborator

This comment has been minimized.

Copy link
@akva2

akva2 Aug 15, 2016

Author Contributor

actually it's not entirely clear what you want, can you send the change so we get it right?

&& sed -ie "s|static volatile sig_atomic_t intr_signal|static volatile intr_signal|" ${PROJECT_SOURCE_DIR}/crypto/ui/ui_openssl.c)
endif()

if(CORE_SYSTEM_NAME MATCHES "osx")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(configure_command <SOURCE_DIR>/Configure darwin64-x86_64-cc zlib no-asm no-krb5 shared --openssldir=${OUTPUT_DIR})
else()
set(configure_command <SOURCE_DIR>/Configure darwin-x86-cc zlib no-asm no-krb5 shared --openssldir=${OUTPUT_DIR})
endif()
endif()

externalproject_add(openssl
SOURCE_DIR ${CMAKE_SOURCE_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${configure_command}
BUILD_COMMAND echo Building openssl ${build_command}
COMMAND sed -ie "s|apps test||" ${PROJECT_SOURCE_DIR}/Makefile
COMMAND make depend
COMMAND make
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1)

install(CODE "execute_process(COMMAND make install_sw
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND rm -f ${OUTPUT_DIR}/lib/libcrypto.so*
COMMAND rm -f ${OUTPUT_DIR}/lib/libssl.so*
COMMAND rm -f ${OUTPUT_DIR}/lib/libcrypto*dylib*
COMMAND rm -f ${OUTPUT_DIR}/lib/libssl*dylib*
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
1 change: 1 addition & 0 deletions depends/common/openssl/deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zlib
1 change: 1 addition & 0 deletions depends/common/openssl/openssl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openssl http://mirrors.xbmc.org/build-deps/sources/openssl-1.0.2h.tar.gz
1 change: 1 addition & 0 deletions depends/common/zlib/zlib.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zlib http://mirrors.xbmc.org/build-deps/sources/zlib-1.2.8.tar.gz

0 comments on commit 7bf2298

Please sign in to comment.