[FFmpeg-devel] [PATCH] Re-add OS/2 support

Dave Yeo daveryeo
Wed Oct 10 01:43:46 CEST 2007


On 10/08/07 06:28 am, Diego Biurrun wrote:
> On Sun, Oct 07, 2007 at 10:16:26PM -0700, Dave Yeo wrote:
>> Diego Biurrun wrote:
>>> On Sat, Sep 15, 2007 at 09:38:39PM -0700, Dave Yeo wrote:
>>>> Diego Biurrun wrote:
...
>>>> Note also that we (and also Windows?) need an extra uninstall command as 
>>>> well in a future patch.
>>> Patches welcome.
>> Yes, well one patch at a time :)

I've attached a quick untested patch for mingw, should uninstall the
same import lib installed by SLIB_INSTALL_EXTRA_CMD. Kept to the same
style as used in the rest of mingw section.
cygwin appears broken to me. SHFLAGS has --out-implib=lib$(NAME).dll.a
which I take it so gcc creates an import lib with the .dll.a suffix but
this is never installed. Perhaps cygwin links directly against DLLs?

> 
> Let's see the patch right away.  If it is needed on Windows I'll likely
> apply it right away.
> 
>>>> After ./configure --enable-shared --enable-os2threads && make && make 
>>>> install with attached patch.
>> 10-07-07   6:53p   2244033         124  avcodec-51.44.0.dll
>> 10-07-07   6:53p   2244033         124  avcodec-51.dll
>> 10-07-07   6:53p   2244033         124  avcodec.dll
>> 10-07-07   6:53p    168056         124  libavcodec_dll.a
>> 10-07-07   6:53p    103936         124  libavcodec_dll.lib
>> 10-07-07   6:53p  11030528         124  libavcodec_s.lib
>> ...
>>
>> updated patch attached
> 
> Here are some further comments.
> 
>> --- configure	(revision 10679)
>> +++ configure	(working copy)
>> @@ -1210,6 +1212,25 @@
>>      targetos=irix
>>      ranlib="echo ignoring ranlib"
>>      ;;
>> +  os/2)
>> +    ln_s="cp -f"
>> +    LIBSUF="_s.lib"
>> +    SLIBPREF=""
>> +    SLIBSUF=".dll"
>> +    SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
>> +    SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
>> +    SLIB_EXTRA_CMD='dllar -o $(SLIBNAME) $(LIB) -d $(SLIBNAME_WITH_MAJOR) -omf -ord $(LDFLAGS) $(EXTRALIBS) $(EXTRAOBJS); cp -f $(SLIBNAME) $(SLIBNAME_WITH_MAJOR)'
> 
> The cp -f command is redundant, look at common.mak more closely, it's
> already there.

Actually the cp -f command in common.mak does cp -f
$(SLIBNAME_WITH_MAJOR) $(SLIBNAME). To keep make happy we let a bad
SLIBNAME_WITH_MAJOR get built then replace it with the good DLL that
dllar.cmd delivers. It is somewhat redundant but made minimal changes to
   the build system.
> 
>> +    SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SLIBNAME:$(SLIBSUF)=.lib) $(LIBDIR)/$(LIBPREF)$(NAME)_dll.lib; install -m 644 $(SLIBNAME:$(SLIBSUF)=.a) $(LIBDIR)/$(LIBPREF)$(NAME)_dll.a'
> 
> $(SLIBNAME:$(SLIBSUF)=.a) could be simplified if you set LIBPREF and
> used LIB.
>

No, we're basically doing cp foo.a $LIBDIR/libfoo_dll.a At this point
LIB is set to libfoo_s.lib and LIBPREF is set to lib already.
> Diego
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unistall.diff
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071009/fa0f8609/attachment.bin>



More information about the ffmpeg-devel mailing list