Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added lzma-c branch #6

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions ports/lzma-c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First thing first: I have a compilation error when trying it. Here's the error. I'll let you have fun with it 😄

[1/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zBuf.c.o -MF CMakeFiles/lzma.dir/C/7zBuf.c.o.d -o CMakeFiles/lzma.dir/C/7zBuf.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zBuf.c
[2/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zCrcOpt.c.o -MF CMakeFiles/lzma.dir/C/7zCrcOpt.c.o.d -o CMakeFiles/lzma.dir/C/7zCrcOpt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zCrcOpt.c
[3/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zCrc.c.o -MF CMakeFiles/lzma.dir/C/7zCrc.c.o.d -o CMakeFiles/lzma.dir/C/7zCrc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zCrc.c
[4/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zBuf2.c.o -MF CMakeFiles/lzma.dir/C/7zBuf2.c.o.d -o CMakeFiles/lzma.dir/C/7zBuf2.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zBuf2.c
[5/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/AesOpt.c.o -MF CMakeFiles/lzma.dir/C/AesOpt.c.o.d -o CMakeFiles/lzma.dir/C/AesOpt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/AesOpt.c
[6/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zStream.c.o -MF CMakeFiles/lzma.dir/C/7zStream.c.o.d -o CMakeFiles/lzma.dir/C/7zStream.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zStream.c
[7/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zDec.c.o -MF CMakeFiles/lzma.dir/C/7zDec.c.o.d -o CMakeFiles/lzma.dir/C/7zDec.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zDec.c
[8/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Aes.c.o -MF CMakeFiles/lzma.dir/C/Aes.c.o.d -o CMakeFiles/lzma.dir/C/Aes.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Aes.c
[9/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zFile.c.o -MF CMakeFiles/lzma.dir/C/7zFile.c.o.d -o CMakeFiles/lzma.dir/C/7zFile.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zFile.c
[10/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zAlloc.c.o -MF CMakeFiles/lzma.dir/C/7zAlloc.c.o.d -o CMakeFiles/lzma.dir/C/7zAlloc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zAlloc.c
[11/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Alloc.c.o -MF CMakeFiles/lzma.dir/C/Alloc.c.o.d -o CMakeFiles/lzma.dir/C/Alloc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Alloc.c
[12/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/7zArcIn.c.o -MF CMakeFiles/lzma.dir/C/7zArcIn.c.o.d -o CMakeFiles/lzma.dir/C/7zArcIn.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/7zArcIn.c
[13/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Bra86.c.o -MF CMakeFiles/lzma.dir/C/Bra86.c.o.d -o CMakeFiles/lzma.dir/C/Bra86.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Bra86.c
[14/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Bcj2.c.o -MF CMakeFiles/lzma.dir/C/Bcj2.c.o.d -o CMakeFiles/lzma.dir/C/Bcj2.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Bcj2.c
[15/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/BraIA64.c.o -MF CMakeFiles/lzma.dir/C/BraIA64.c.o.d -o CMakeFiles/lzma.dir/C/BraIA64.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/BraIA64.c
[16/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Bcj2Enc.c.o -MF CMakeFiles/lzma.dir/C/Bcj2Enc.c.o.d -o CMakeFiles/lzma.dir/C/Bcj2Enc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Bcj2Enc.c
[17/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Bra.c.o -MF CMakeFiles/lzma.dir/C/Bra.c.o.d -o CMakeFiles/lzma.dir/C/Bra.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Bra.c
[18/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Delta.c.o -MF CMakeFiles/lzma.dir/C/Delta.c.o.d -o CMakeFiles/lzma.dir/C/Delta.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Delta.c
[19/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/DllSecur.c.o -MF CMakeFiles/lzma.dir/C/DllSecur.c.o.d -o CMakeFiles/lzma.dir/C/DllSecur.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/DllSecur.c
[20/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/CpuArch.c.o -MF CMakeFiles/lzma.dir/C/CpuArch.c.o.d -o CMakeFiles/lzma.dir/C/CpuArch.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/CpuArch.c
[21/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/LzFindMt.c.o -MF CMakeFiles/lzma.dir/C/LzFindMt.c.o.d -o CMakeFiles/lzma.dir/C/LzFindMt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c
FAILED: CMakeFiles/lzma.dir/C/LzFindMt.c.o 
/usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/LzFindMt.c.o -MF CMakeFiles/lzma.dir/C/LzFindMt.c.o.d -o CMakeFiles/lzma.dir/C/LzFindMt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:8:
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.h:8:
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:15:22: error: unknown type name 'HANDLE'
WRes HandlePtr_Close(HANDLE *h);
                     ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:16:24: error: unknown type name 'HANDLE'
WRes Handle_WaitObject(HANDLE h);
                       ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:18:9: error: unknown type name 'HANDLE'
typedef HANDLE CThread;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:35:55: error: unknown type name 'LPVOID'
WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param);
                                                      ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:37:9: error: unknown type name 'HANDLE'
typedef HANDLE CEvent;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:51:9: error: unknown type name 'HANDLE'
typedef HANDLE CSemaphore;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:60:9: error: unknown type name 'CRITICAL_SECTION'
typedef CRITICAL_SECTION CCriticalSection;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:15:3: warning: incompatible pointer to integer conversion assigning to 'CThread' (aka 'int') from 'void *' [-Wint-conversion]
  Thread_Construct(&p->thread);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:19:34: note: expanded from macro 'Thread_Construct'
#define Thread_Construct(p) *(p) = NULL
                                 ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:16:3: warning: incompatible pointer to integer conversion assigning to 'CAutoResetEvent' (aka 'int') from 'void *' [-Wint-conversion]
  Event_Construct(&p->canStart);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:40:33: note: expanded from macro 'Event_Construct'
#define Event_Construct(p) *(p) = NULL
                                ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:17:3: warning: incompatible pointer to integer conversion assigning to 'CAutoResetEvent' (aka 'int') from 'void *' [-Wint-conversion]
  Event_Construct(&p->wasStarted);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:40:33: note: expanded from macro 'Event_Construct'
#define Event_Construct(p) *(p) = NULL
                                ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:18:3: warning: incompatible pointer to integer conversion assigning to 'CAutoResetEvent' (aka 'int') from 'void *' [-Wint-conversion]
  Event_Construct(&p->wasStopped);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:40:33: note: expanded from macro 'Event_Construct'
#define Event_Construct(p) *(p) = NULL
                                ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:19:3: warning: incompatible pointer to integer conversion assigning to 'CSemaphore' (aka 'int') from 'void *' [-Wint-conversion]
  Semaphore_Construct(&p->freeSemaphore);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:52:37: note: expanded from macro 'Semaphore_Construct'
#define Semaphore_Construct(p) *(p) = NULL
                                    ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:20:3: warning: incompatible pointer to integer conversion assigning to 'CSemaphore' (aka 'int') from 'void *' [-Wint-conversion]
  Semaphore_Construct(&p->filledSemaphore);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:52:37: note: expanded from macro 'Semaphore_Construct'
#define Semaphore_Construct(p) *(p) = NULL
                                    ^ ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:41:5: warning: implicit declaration of function 'LeaveCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
    CriticalSection_Leave(&p->cs);
    ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:64:34: note: expanded from macro 'CriticalSection_Leave'
#define CriticalSection_Leave(p) LeaveCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:47:3: warning: implicit declaration of function 'EnterCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
  CriticalSection_Enter(&p->cs);
  ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:63:34: note: expanded from macro 'CriticalSection_Enter'
#define CriticalSection_Enter(p) EnterCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:56:8: warning: comparison between pointer and integer ('CThread' (aka 'int') and 'void *') [-Wpointer-integer-compare]
  if (!Thread_WasCreated(&p->thread) || p->needStart)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:20:36: note: expanded from macro 'Thread_WasCreated'
#define Thread_WasCreated(p) (*(p) != NULL)
                              ~~~~ ^  ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:61:5: warning: implicit declaration of function 'LeaveCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
    CriticalSection_Leave(&p->cs);
    ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:64:34: note: expanded from macro 'CriticalSection_Leave'
#define CriticalSection_Leave(p) LeaveCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:78:7: warning: comparison between pointer and integer ('CThread' (aka 'int') and 'void *') [-Wpointer-integer-compare]
  if (Thread_WasCreated(&p->thread))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:20:36: note: expanded from macro 'Thread_WasCreated'
#define Thread_WasCreated(p) (*(p) != NULL)
                              ~~~~ ^  ~~~~
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:89:5: warning: implicit declaration of function 'DeleteCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
    CriticalSection_Delete(&p->cs);
    ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:62:35: note: expanded from macro 'CriticalSection_Delete'
#define CriticalSection_Delete(p) DeleteCriticalSection(p)
                                  ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:178:11: warning: implicit declaration of function 'EnterCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
          CriticalSection_Enter(&mt->btSync.cs);
          ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:63:34: note: expanded from macro 'CriticalSection_Enter'
#define CriticalSection_Enter(p) EnterCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:188:11: warning: implicit declaration of function 'LeaveCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
          CriticalSection_Leave(&mt->btSync.cs);
          ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:64:34: note: expanded from macro 'CriticalSection_Leave'
#define CriticalSection_Leave(p) LeaveCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:431:5: warning: implicit declaration of function 'EnterCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
    CriticalSection_Enter(&sync->cs);
    ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:63:34: note: expanded from macro 'CriticalSection_Enter'
#define CriticalSection_Enter(p) EnterCriticalSection(p)
                                 ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFindMt.c:446:5: warning: implicit declaration of function 'LeaveCriticalSection' is invalid in C99 [-Wimplicit-function-declaration]
    CriticalSection_Leave(&sync->cs);
    ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:64:34: note: expanded from macro 'CriticalSection_Leave'
#define CriticalSection_Leave(p) LeaveCriticalSection(p)
                                 ^
16 warnings and 7 errors generated.
[22/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o -MF CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o.d -o CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2DecMt.c
FAILED: CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o 
/usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o -MF CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o.d -o CMakeFiles/lzma.dir/C/Lzma2DecMt.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2DecMt.c
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2DecMt.c:30:
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/MtDec.h:10:
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:15:22: error: unknown type name 'HANDLE'
WRes HandlePtr_Close(HANDLE *h);
                     ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:16:24: error: unknown type name 'HANDLE'
WRes Handle_WaitObject(HANDLE h);
                       ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:18:9: error: unknown type name 'HANDLE'
typedef HANDLE CThread;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:35:55: error: unknown type name 'LPVOID'
WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param);
                                                      ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:37:9: error: unknown type name 'HANDLE'
typedef HANDLE CEvent;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:51:9: error: unknown type name 'HANDLE'
typedef HANDLE CSemaphore;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:60:9: error: unknown type name 'CRITICAL_SECTION'
typedef CRITICAL_SECTION CCriticalSection;
        ^
7 errors generated.
[23/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma2Enc.c.o -MF CMakeFiles/lzma.dir/C/Lzma2Enc.c.o.d -o CMakeFiles/lzma.dir/C/Lzma2Enc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2Enc.c
FAILED: CMakeFiles/lzma.dir/C/Lzma2Enc.c.o 
/usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma2Enc.c.o -MF CMakeFiles/lzma.dir/C/Lzma2Enc.c.o.d -o CMakeFiles/lzma.dir/C/Lzma2Enc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2Enc.c
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2Enc.c:13:
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/MtCoder.h:7:
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/MtDec.h:10:
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:15:22: error: unknown type name 'HANDLE'
WRes HandlePtr_Close(HANDLE *h);
                     ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:16:24: error: unknown type name 'HANDLE'
WRes Handle_WaitObject(HANDLE h);
                       ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:18:9: error: unknown type name 'HANDLE'
typedef HANDLE CThread;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:35:55: error: unknown type name 'LPVOID'
WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param);
                                                      ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:37:9: error: unknown type name 'HANDLE'
typedef HANDLE CEvent;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:51:9: error: unknown type name 'HANDLE'
typedef HANDLE CSemaphore;
        ^
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Threads.h:60:9: error: unknown type name 'CRITICAL_SECTION'
typedef CRITICAL_SECTION CCriticalSection;
        ^
In file included from /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2Enc.c:13:
/home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/MtCoder.h:110:5: error: unknown type name 'LONG'
    LONG numFinishedThreads;
    ^
8 errors generated.
[24/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma86Dec.c.o -MF CMakeFiles/lzma.dir/C/Lzma86Dec.c.o.d -o CMakeFiles/lzma.dir/C/Lzma86Dec.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma86Dec.c
[25/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma2Dec.c.o -MF CMakeFiles/lzma.dir/C/Lzma2Dec.c.o.d -o CMakeFiles/lzma.dir/C/Lzma2Dec.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma2Dec.c
[26/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/LzFind.c.o -MF CMakeFiles/lzma.dir/C/LzFind.c.o.d -o CMakeFiles/lzma.dir/C/LzFind.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzFind.c
[27/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/Lzma86Enc.c.o -MF CMakeFiles/lzma.dir/C/Lzma86Enc.c.o.d -o CMakeFiles/lzma.dir/C/Lzma86Enc.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/Lzma86Enc.c
[28/46] /usr/bin/cc   -fPIC -g -MD -MT CMakeFiles/lzma.dir/C/LzmaDec.c.o -MF CMakeFiles/lzma.dir/C/LzmaDec.c.o.d -o CMakeFiles/lzma.dir/C/LzmaDec.c.o   -c /home/klalumiere/Projects/vcpkg-jangboo/buildtrees/lzma/src/lzma-19-a5ec4f69c5/C/LzmaDec.c
ninja: build stopped: subcommand failed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might be a good excuse to install WSL (Windows Subsystem for Linux) if you want to do it 😄

set(CMAKE_VERBOSE_MAKEFILE off)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained here, line 4, i.e. project(lzma), initialize this variable to false <=> off. Hence, you do not need this line.


project(lzma)

file(GLOB HDR_FILES
${PROJECT_SOURCE_DIR}/C/*.h)

file(GLOB SRC_FILES
${PROJECT_SOURCE_DIR}/C/*.c)

add_library(lzma SHARED
${SRC_FILES}
${HDR_FILES}
)

install(
TARGETS lzma
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

install(
FILES ${HDR_FILES}
DESTINATION include
)
6 changes: 6 additions & 0 deletions ports/lzma-c/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Source: lzma-c
Version: 19.00
Homepage: https://www.7-zip.org/sdk.html
Description: The LZMA SDK provides the documentation, samples, header files, libraries, and tools you need to develop applications that use LZMA compression.


1 change: 1 addition & 0 deletions ports/lzma-c/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lzma Library License

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to update this to what we discussed about on Slack 😄

29 changes: 29 additions & 0 deletions ports/lzma-c/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

vcpkg_download_distfile(ARCHIVE
URLS "https://www.7-zip.org/a/lzma1900.7z"
FILENAME "lzma-19.00.zip"
SHA512 60532483249d86960d5c481dc88ebeafabb7e435afb6188bc26f38177b8534ef3da83317d6920d99103d4f10a8dcdb624489ea5ddad8e0c8732bab1bb4ebd7eb
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see with the syntax highlight, ARCHIVE in capital letters in not a very good variable name because it is also a field name. In other words, here, you have the "field" ARCHIVE in red, and then you take the content of the ARCHIVE variable with ${ARCHIVE}. This is all very confusing (actually, I would not be surprised if you need to reread this paragraph many times 😆 .

I suggest you rename the variable to lzmaArchive. You'll also need to change it at line 2. Notice that, at line 2, you (most likely) meat to use the ARCHIVE variable, but the syntax highlight gets confused and thinks you're making a reference to the "field" ARCHIVE.

Notice that the word "field" is my invention. I use this word to describe keywords used within a CMAKE commande. For insance, on line 13, COPY and DESTINATION would be "field" of the file command according to my nomemclature. Likewise, SOURCE_PATH and PREFER_NINJA would be "fields" of vcpkg_configure_cmake.

NO_REMOVE_ONE_LEVEL
PATCHES ${PATCHES}
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a semi-pedagogical settings, I'm going to do detail intensive on you 😄
I don't think you need this empty line here, except if you're trying to communicate something. In general, each decision you take into the code should aim to communicate something to both the machine and the other developers that will read the code 🤓 .

)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same vein as above, another very pedantic remark: I do not understand here why you changed paragraphs.

vcpkg_install_cmake()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
set(VCPKG_POLICY_DLLS_WITHOUT_EXPORTS enabled)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you enable those 2 settings?

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib" "${CURRENT_PACKAGES_DIR}/lib")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So lzma builds the release and debug libraries at the same time, is this right? If so, is there a setting in vcpkg that allows to say "I want the debug libraries" or "I want the release librarie"? If yes, we should use it.

Also, this line should go next to line 24 since they are conceptually similar. Actually, why not simply remove the ${CURRENT_PACKAGES_DIR}/debug directory?

configure_file(${CMAKE_CURRENT_LIST_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the sign at the end of this line indicates, no new line at the end of file. This is important on *Nix system, like Linux and macOS: every text file should end with an empty line, because a lot of useful tools assume this is the case.