JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

[PATCH] DecodeIR autotools setup

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
leamas



Joined: 20 Mar 2014
Posts: 7

PostPosted: Tue Apr 07, 2015 5:11 am    Post subject: [PATCH] DecodeIR autotools setup Reply with quote

I have created a patch adding an autotools setup for DecodeIR. It's available at http://ur1.ca/k4g8n (copy here)

The short story is that I have packaged DecodeIR for Fedora (the package will be available in a day or two). While doing this I had to make a new Makefile to generate and install the so-libs/dlls. This is a Bad Thing, it's much better if the upstream (i. e., DecodeIR) has something which can be used as is. This patch resolves this by using autotools to create a Makefile which is adapted to the actual platform, be it Fedora or something else.

The patch does not change anything, it only adds some files. The added new code is about 50 lines, but here is also some documentation and a copy-pasted file. It is very straight-forward from an autotools point of view.

The patch adds dependencies to automake and autoconf. Using these, the workflow is the familiar (?)

$ autoreconf -fi
$ ./configure
$ make
$ sudo make install

For a packager or just any user this provides a way to build DecodeIR on any platform supporting autotools.This is basically everywhere (windows using cygwin)

The generated Makefile is not only adapted for the platform , it also provides more functionality than the current ones. Notably, here is a 'make install' which can be modified during ./configure as to where install things. Here is also a 'make dist' which is a nice command producing a tarball which is extremely usable when making a release. Also, 'make distcheck' checks that the build works from the tarball. And yes, cross-compilation is also supported.

Honestly, using autotools for this might be the second best choice. CMake is known to be somewhat better when targeting also Win32/64.. However, my own interest and skills does not really include CMake, so this is what I could come up with in a reasonable time. So if someone would offer a CMake setup instead I'm perfectly happy with that. However, until that happens I suggest that DecodeIR accepts this patch which handles platform dependencies in a consistent and to many developers familiar way.
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1196

PostPosted: Sat Apr 11, 2015 3:36 am    Post subject: Reply with quote

Nice to have in consolidated. Cool

It works on Linux, it SHOULD work on Mac OS X and Cygwin (generating Windows libs), but I have not tested.

Let me add (not for you, for the rest) that the command to generate the 32 bit version on a 64 bit host is
Code:
./configure CXXFLAGS=-m32


If no-one complains, I will check it in.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central