Import package vendor original specs for necessary manipulations.

Tue, 02 Jul 2013 17:58:45 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 02 Jul 2013 17:58:45 +0200
changeset 780
0a61f30eebd4
parent 779
8a3648cce554
child 781
25504c2d46b1

Import package vendor original specs for necessary manipulations.

erlang/erlang.patch file | annotate | diff | comparison | revisions
erlang/erlang.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/erlang/erlang.patch	Tue Jul 02 17:58:45 2013 +0200
     1.3 @@ -0,0 +1,174 @@
     1.4 +Index: erts/emulator/Makefile.in
     1.5 +--- erts/emulator/Makefile.in.orig	2010-12-07 16:07:22.000000000 +0100
     1.6 ++++ erts/emulator/Makefile.in	2010-12-09 17:06:47.000000000 +0100
     1.7 +@@ -617,7 +617,7 @@
     1.8 + 
     1.9 + 
    1.10 + $(OBJDIR)/%.o: beam/%.c
    1.11 +-	$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
    1.12 ++	$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
    1.13 + 
    1.14 + $(OBJDIR)/%.o: $(TARGET)/%.c
    1.15 + 	$(CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@
    1.16 +Index: erts/emulator/hipe/hipe_x86.c
    1.17 +--- erts/emulator/hipe/hipe_x86.c.orig	2010-12-07 16:07:22.000000000 +0100
    1.18 ++++ erts/emulator/hipe/hipe_x86.c	2010-12-09 17:23:16.000000000 +0100
    1.19 +@@ -130,7 +130,7 @@
    1.20 + 	abort();
    1.21 +     map_start = mmap(map_hint, map_bytes,
    1.22 + 		     PROT_EXEC|PROT_READ|PROT_WRITE,
    1.23 +-		     MAP_PRIVATE|MAP_ANONYMOUS
    1.24 ++		     MAP_PRIVATE|MAP_ANON
    1.25 + #ifdef __x86_64__
    1.26 + 		     |MAP_32BIT
    1.27 + #endif
    1.28 +Index: lib/erl_interface/src/connect/ei_resolve.c
    1.29 +--- lib/erl_interface/src/connect/ei_resolve.c.orig	2010-12-07 16:07:22.000000000 +0100
    1.30 ++++ lib/erl_interface/src/connect/ei_resolve.c	2010-12-09 17:23:16.000000000 +0100
    1.31 +@@ -54,6 +54,10 @@
    1.32 + #include "ei_resolve.h"
    1.33 + #include "ei_locking.h"
    1.34 + 
    1.35 ++#if defined(HAVE_GETHOSTBYNAME_R) && defined(__FreeBSD__)
    1.36 ++#undef HAVE_GETHOSTBYNAME_R
    1.37 ++#endif
    1.38 ++
    1.39 + #ifdef HAVE_GETHOSTBYNAME_R
    1.40 + 
    1.41 + void ei_init_resolve(void)
    1.42 +Index: lib/gs/src/tool_utils.erl
    1.43 +--- lib/gs/src/tool_utils.erl.orig	2010-12-07 16:07:22.000000000 +0100
    1.44 ++++ lib/gs/src/tool_utils.erl	2010-12-09 17:23:16.000000000 +0100
    1.45 +@@ -40,6 +40,9 @@
    1.46 + 	       }).
    1.47 + 
    1.48 + 
    1.49 ++%% Browser executable list (openURL command line protocol required)
    1.50 ++-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]).
    1.51 ++
    1.52 + %%----------------------------------------------------------------------
    1.53 + %% open_help(Parent, File)
    1.54 + %%   Parent = gsobj()  (GS root object or parent window)
    1.55 +@@ -80,7 +83,7 @@
    1.56 + 		      {unix,Type} ->
    1.57 +                           case Type of
    1.58 +                                darwin -> "open " ++ File;
    1.59 +-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
    1.60 ++                               _Else -> unix_url_command("file:" ++ File)
    1.61 + 			  end;
    1.62 + 		      {win32,_AnyType} ->
    1.63 + 			  "start " ++ filename:nativename(File);
    1.64 +@@ -95,7 +98,7 @@
    1.65 + 		      {unix,Type} ->
    1.66 +                           case Type of
    1.67 +                                darwin -> "open " ++ File;
    1.68 +-                               _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\""
    1.69 ++                               _Else -> unix_url_command("file:" ++ File)
    1.70 + 			  end;
    1.71 + 		      {win32,_AnyType} ->
    1.72 + 			  "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/");
    1.73 +@@ -429,3 +432,53 @@
    1.74 +     [Last];
    1.75 + insert_newlines(Other) ->
    1.76 +     Other.
    1.77 ++
    1.78 ++%% find_browser(BrowserList) => string() | false
    1.79 ++%%   BrowserList - [string()]
    1.80 ++%% Given a list of basenames, find the first available executable.
    1.81 ++
    1.82 ++find_browser([]) ->
    1.83 ++    false;
    1.84 ++
    1.85 ++find_browser([H | T]) ->
    1.86 ++    case os:find_executable(H) of
    1.87 ++        false ->
    1.88 ++          find_browser(T);
    1.89 ++        Browser ->
    1.90 ++          Browser
    1.91 ++    end.
    1.92 ++
    1.93 ++%% unix_url_command(URL) => string()
    1.94 ++%%   URL - string()
    1.95 ++%% Open an URL, using a browser which supports the openURL command
    1.96 ++%% line protocol. If no browser is found, the empty string will be
    1.97 ++%% returned.
    1.98 ++
    1.99 ++unix_url_command(URL) ->
   1.100 ++    Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&",
   1.101 ++
   1.102 ++    case os:getenv("BROWSER") of
   1.103 ++	false ->
   1.104 ++	    %% look for a compatible browser
   1.105 ++	    case find_browser(?BROWSERS) of
   1.106 ++		false ->
   1.107 ++		    "";
   1.108 ++		Browser ->
   1.109 ++		    case regexp:gsub(Template, "BROWSER", Browser) of
   1.110 ++			{ok, Command, 0} ->
   1.111 ++			    %% Template does not contain "BROWSER" placeholder
   1.112 ++			    "";
   1.113 ++			{ok, Command, _} ->
   1.114 ++			    Command
   1.115 ++		    end
   1.116 ++	    end;
   1.117 ++
   1.118 ++	Value ->
   1.119 ++	    case regexp:gsub(Template, "BROWSER", Value) of
   1.120 ++		{ok, Command2, 0} ->
   1.121 ++		    %% no placeholder
   1.122 ++		    "";
   1.123 ++		{ok, Command2, _} ->
   1.124 ++		    Command2
   1.125 ++	    end
   1.126 ++    end.
   1.127 +Index: lib/hipe/regalloc/Makefile
   1.128 +--- lib/hipe/regalloc/Makefile.orig	2010-12-07 16:07:22.000000000 +0100
   1.129 ++++ lib/hipe/regalloc/Makefile	2010-12-09 17:23:16.000000000 +0100
   1.130 +@@ -46,7 +46,6 @@
   1.131 + 	  hipe_node_sets hipe_spillcost hipe_reg_worklists \
   1.132 + 	  hipe_adj_list \
   1.133 + 	  hipe_temp_map \
   1.134 +-	  hipe_optimistic_regalloc \
   1.135 + 	  hipe_coalescing_regalloc \
   1.136 + 	  hipe_graph_coloring_regalloc \
   1.137 + 	  hipe_regalloc_loop \
   1.138 +Index: lib/stdlib/src/calendar.erl
   1.139 +--- lib/stdlib/src/calendar.erl.orig	2010-12-07 16:07:22.000000000 +0100
   1.140 ++++ lib/stdlib/src/calendar.erl	2010-12-09 17:23:16.000000000 +0100
   1.141 +@@ -216,11 +216,19 @@
   1.142 + 
   1.143 + -spec local_time_to_universal_time_dst(t_datetime1970()) -> [t_datetime1970()].
   1.144 + local_time_to_universal_time_dst(DateTime) ->
   1.145 +-    UtDst = erlang:localtime_to_universaltime(DateTime, true),
   1.146 +-    Ut    = erlang:localtime_to_universaltime(DateTime, false),
   1.147 +     %% Reverse check the universal times
   1.148 +-    LtDst = erlang:universaltime_to_localtime(UtDst),
   1.149 +-    Lt    = erlang:universaltime_to_localtime(Ut),
   1.150 ++    {UtDst, LtDst} =
   1.151 ++        try
   1.152 ++            UtDst0 = erlang:localtime_to_universaltime(DateTime, true),
   1.153 ++            {UtDst0, erlang:universaltime_to_localtime(UtDst0)}
   1.154 ++        catch error:badarg -> {error, error}
   1.155 ++        end,
   1.156 ++    {Ut, Lt} =
   1.157 ++        try
   1.158 ++            Ut0 = erlang:localtime_to_universaltime(DateTime, false),
   1.159 ++            {Ut0, erlang:universaltime_to_localtime(Ut0)}
   1.160 ++        catch error:badarg -> {error, error}
   1.161 ++        end,
   1.162 +     %% Return the valid universal times
   1.163 +     case {LtDst,Lt} of
   1.164 + 	{DateTime,DateTime} when UtDst =/= Ut ->
   1.165 +Index: lib/tools/emacs/test.erl
   1.166 +Index: lib/wx/configure
   1.167 +--- lib/wx/configure.orig	2010-12-07 16:07:22.000000000 +0100
   1.168 ++++ lib/wx/configure	2010-12-09 17:23:16.000000000 +0100
   1.169 +@@ -3910,7 +3910,7 @@
   1.170 + 	;;
   1.171 +     *)
   1.172 + 	DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS"
   1.173 +-	CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
   1.174 ++	CFLAGS="-Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS %%CFLAGS%%"
   1.175 + 	;;
   1.176 + esac
   1.177 + 
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/erlang/erlang.spec	Tue Jul 02 17:58:45 2013 +0200
     2.3 @@ -0,0 +1,103 @@
     2.4 +##
     2.5 +##  erlang.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package version
    2.28 +%define       V_opkg   R15B03.1
    2.29 +%define       V_real   R15B03-1
    2.30 +%define       V_subdir R15B03
    2.31 +
    2.32 +#   package information
    2.33 +Name:         erlang
    2.34 +Summary:      Erlang Programming Language
    2.35 +URL:          http://www.erlang.org/
    2.36 +Vendor:       Ericsson Computer Science Laboratory
    2.37 +Packager:     OpenPKG Foundation e.V.
    2.38 +Distribution: OpenPKG Community
    2.39 +Class:        EVAL
    2.40 +Group:        Language
    2.41 +License:      Erlang Public License
    2.42 +Version:      %{V_opkg}
    2.43 +Release:      20121208
    2.44 +
    2.45 +#   list of sources
    2.46 +Source0:      http://www.erlang.org/download/otp_src_%{V_real}.tar.gz
    2.47 +Source1:      http://www.erlang.org/download/otp_doc_man_%{V_real}.tar.gz
    2.48 +Patch0:       erlang.patch
    2.49 +
    2.50 +#   build information
    2.51 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, m4
    2.52 +PreReq:       OpenPKG, openpkg >= 20100101
    2.53 +BuildPreReq:  openssl
    2.54 +PreReq:       openssl
    2.55 +
    2.56 +%description
    2.57 +    Erlang is a general-purpose programming language and runtime
    2.58 +    environment. Erlang has built-in support for concurrency,
    2.59 +    distribution and fault tolerance. Erlang is used in several large
    2.60 +    telecommunication systems from Ericsson.
    2.61 +
    2.62 +%track
    2.63 +    prog erlang = {
    2.64 +        version   = %{V_real}
    2.65 +        url       = http://www.erlang.org/download/
    2.66 +        regex     = otp_src_(__VER__)\.tar\.gz
    2.67 +    }
    2.68 +
    2.69 +%prep
    2.70 +    %setup -q -n otp_src_%{V_subdir}
    2.71 +    %patch -p0
    2.72 +
    2.73 +%build
    2.74 +    CC="%{l_cc}" \
    2.75 +    CFLAGS="%{l_cflags -O}" \
    2.76 +    CPPFLAGS="%{l_cppflags}" \
    2.77 +    LDFLAGS="%{l_ldflags}" \
    2.78 +    JAVAC="false" \
    2.79 +    ./configure \
    2.80 +        --prefix=%{l_prefix} \
    2.81 +        --with-ssl=%{l_prefix}
    2.82 +    %{l_make} %{l_mflags}
    2.83 +
    2.84 +%install
    2.85 +    %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT
    2.86 +    ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
    2.87 +      for file in erl erlc epmd run_erl to_erl dialyzer escript typer; do
    2.88 +          rm -f $file
    2.89 +          ln -s ../lib/erlang/bin/$file $file
    2.90 +      done
    2.91 +      cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin
    2.92 +      rm -f epmd
    2.93 +      ln -s ../erts-*/bin/epmd epmd
    2.94 +      cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin
    2.95 +      %{l_shtool} subst \
    2.96 +          -e "s;$RPM_BUILD_ROOT;;" \
    2.97 +          erl start
    2.98 +      cd $RPM_BUILD_ROOT%{l_prefix}
    2.99 +      %{l_gzip} -c -d %{SOURCE1} | %{l_tar} xf - 'man/man1'
   2.100 +    ) || exit $?
   2.101 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.102 +
   2.103 +%files -f files
   2.104 +
   2.105 +%clean
   2.106 +

mercurial