/lept/xxx
+ *--------------------------------------------------------------------*/
+
+
+diff -Nura leptonica-1.83.1/src/finditalic.c leptonica-1.83.1-patch/src/finditalic.c
+--- leptonica-1.83.1/src/finditalic.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/finditalic.c 2024-09-05 14:26:11.075617043 +0800
+@@ -179,7 +179,7 @@
+ PIX *pix1, *pix2, *pix3;
+ pixa1 = pixaCreate(0);
+ boxat = pixConnComp(pixm, NULL, 8);
+- boxaWriteDebug("/tmp/lept/ital/ital.ba", boxat);
++ boxaWriteDebug("/data/local/tmp/lept/ital/ital.ba", boxat);
+ pixaAddPix(pixa1, pixs, L_COPY); /* orig */
+ pixaAddPix(pixa1, pixsd, L_COPY); /* seed */
+ pix1 = pixConvertTo32(pixm);
+@@ -198,7 +198,7 @@
+ pixDestroy(&pix2);
+ pixDestroy(&pix3);
+ pix2 = pixaDisplayTiledInColumns(pixa1, 1, 0.5, 20, 2);
+- snprintf(buf, sizeof(buf), "/tmp/lept/ital/ital.%d.png", type);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/ital/ital.%d.png", type);
+ pixWriteDebug(buf, pix2, IFF_PNG);
+ pixDestroy(&pix2);
+
+@@ -209,7 +209,7 @@
+ res = pixGetWidth(pixs) / 12;
+ L_INFO("resolution = %d\n", __func__, res);
+ l_pdfSetDateAndVersion(0);
+- snprintf(buf, sizeof(buf), "/tmp/lept/ital/ital.%d.pdf", type);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/ital/ital.%d.pdf", type);
+ pixaConvertToPdf(pixa1, res, 1.0, L_FLATE_ENCODE, 75, "Italic Finder",
+ buf);
+ l_pdfSetDateAndVersion(1);
+@@ -225,7 +225,7 @@
+ upper = L_MAX(30, 3 * size);
+ na = pixRunHistogramMorph(pix1, L_RUN_OFF, L_HORIZ, upper);
+ pixDestroy(&pix1);
+- gplot = gplotCreate("/tmp/lept/ital/runhisto", GPLOT_PNG,
++ gplot = gplotCreate("/data/local/tmp/lept/ital/runhisto", GPLOT_PNG,
+ "Histogram of horizontal runs of white pixels, vs length",
+ "run length", "number of runs");
+ gplotAddPlot(gplot, NULL, na, GPLOT_LINES, "plot1");
+diff -Nura leptonica-1.83.1/src/flipdetect.c leptonica-1.83.1-patch/src/flipdetect.c
+--- leptonica-1.83.1/src/flipdetect.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/flipdetect.c 2024-09-05 14:26:11.079616965 +0800
+@@ -618,7 +618,7 @@
+ pixAnd(pix1, pix1, pixm);
+ pix3 = pixReduceRankBinaryCascade(pix1, 1, 1, 0, 0);
+ pixCountPixels(pix3, &countup, NULL);
+- pixDebugFlipDetect("/tmp/lept/orient/up.png", pixs, pix1, debug);
++ pixDebugFlipDetect("/data/local/tmp/lept/orient/up.png", pixs, pix1, debug);
+ pixDestroy(&pix1);
+ pixDestroy(&pix2);
+ pixDestroy(&pix3);
+@@ -631,7 +631,7 @@
+ pixAnd(pix1, pix1, pixm);
+ pix3 = pixReduceRankBinaryCascade(pix1, 1, 1, 0, 0);
+ pixCountPixels(pix3, &countdown, NULL);
+- pixDebugFlipDetect("/tmp/lept/orient/down.png", pixs, pix1, debug);
++ pixDebugFlipDetect("/data/local/tmp/lept/orient/down.png", pixs, pix1, debug);
+ pixDestroy(&pix1);
+ pixDestroy(&pix2);
+ pixDestroy(&pix3);
+@@ -645,7 +645,7 @@
+ *pconf = 2. * ((nup - ndown) / sqrt(nup + ndown));
+
+ if (debug) {
+- if (pixm) pixWriteDebug("/tmp/lept/orient/pixm1.png", pixm, IFF_PNG);
++ if (pixm) pixWriteDebug("/data/local/tmp/lept/orient/pixm1.png", pixm, IFF_PNG);
+ lept_stderr("nup = %7.3f, ndown = %7.3f, conf = %7.3f\n",
+ nup, ndown, *pconf);
+ if (*pconf > DefaultMinUpDownConf)
+@@ -745,7 +745,7 @@
+ pix1 = pixHMT(NULL, pix0, sel1);
+ pix3 = pixReduceRankBinaryCascade(pix1, 1, 1, 0, 0);
+ pixCountPixels(pix3, &count1, NULL);
+- pixDebugFlipDetect("/tmp/lept/orient/right.png", pixs, pix1, debug);
++ pixDebugFlipDetect("/data/local/tmp/lept/orient/right.png", pixs, pix1, debug);
+ pixDestroy(&pix1);
+ pixDestroy(&pix3);
+
+@@ -753,7 +753,7 @@
+ pix2 = pixHMT(NULL, pix0, sel2);
+ pix3 = pixReduceRankBinaryCascade(pix2, 1, 1, 0, 0);
+ pixCountPixels(pix3, &count2, NULL);
+- pixDebugFlipDetect("/tmp/lept/orient/left.png", pixs, pix2, debug);
++ pixDebugFlipDetect("/data/local/tmp/lept/orient/left.png", pixs, pix2, debug);
+ pixDestroy(&pix2);
+ pixDestroy(&pix3);
+
+diff -Nura leptonica-1.83.1/src/flipdetectdwa.c.notused leptonica-1.83.1-patch/src/flipdetectdwa.c.notused
+--- leptonica-1.83.1/src/flipdetectdwa.c.notused 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/flipdetectdwa.c.notused 2024-09-05 14:26:11.079616965 +0800
+@@ -265,7 +265,7 @@
+ if (debug) {
+ if (pixm) {
+ lept_mkdir("lept/orient");
+- pixWriteDebug("/tmp/lept/orient/pixm2.png", pixm, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/orient/pixm2.png", pixm, IFF_PNG);
+ }
+ lept_stderr("nup = %7.3f, ndown = %7.3f, conf = %7.3f\n",
+ nup, ndown, *pconf);
+diff -Nura leptonica-1.83.1/src/gplot.c leptonica-1.83.1-patch/src/gplot.c
+--- leptonica-1.83.1/src/gplot.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/gplot.c 2024-09-05 14:26:11.079616965 +0800
+@@ -92,7 +92,7 @@
+ * Specify the root of output files, the output format,
+ * and the title (optional), but not the x and y coordinate labels
+ * or the plot labels. The plotstyle defaults to GPLOT_LINES.
+- * gplotSimple2(na1, na2, GPLOT_PNG, "/tmp/lept/histo/gray",
++ * gplotSimple2(na1, na2, GPLOT_PNG, "/data/local/tmp/lept/histo/gray",
+ * "gray histogram");
+ * Multiple plots can be generated using gplotSimpleN().
+ *
+@@ -101,7 +101,7 @@
+ * and optionally the title, but not the x and y coordinate labels
+ * or the plot labels.
+ * gplotSimpleXY1(na1, na2, GPLOT_LINES, GPLOT_PNG,
+- * "/tmp/lept/histo/gray", "gray histogram");
++ * "/data/local/tmp/lept/histo/gray", "gray histogram");
+ * Multiple plots can be generated using gplotSimpleXYN().
+ *
+ * -- Simple plots returning a pix --
+@@ -117,7 +117,7 @@
+ * the title and axis labels. This does not allow the individual
+ * plots to have plot labels, or to use different plotstyles
+ * for each plot.
+- * Pix *pix = gplotGeneralPix2(na1, na2, "/tmp/lept/histo/gray",
++ * Pix *pix = gplotGeneralPix2(na1, na2, "/data/local/tmp/lept/histo/gray",
+ * GPLOT_LINES, "gray histogram",
+ * "pix value", "num pixels");
+ * Multiple plots can be generated using gplotGeneralPixN().
+@@ -447,7 +447,7 @@
+ * (2) Along with gplotMakeOutputPix(), these are the only functions
+ * in this file that requires the gnuplot executable to
+ * actually generate the plot.
+- * (3) The command file name for unix is canonical (i.e., directory /tmp)
++ * (3) The command file name for unix is canonical (i.e., directory /data/local/tmp)
+ * but the temp filename paths in the command file must be correct.
+ * (4) The gnuplot program for Windows is wgnuplot.exe.
+ *
+@@ -763,7 +763,7 @@
+ return (PIX *)ERROR_PTR("na not defined", __func__, NULL);
+
+ lept_mkdir("lept/gplot/pix");
+- snprintf(buf, sizeof(buf), "/tmp/lept/gplot/pix1.%d", index++);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/gplot/pix1.%d", index++);
+ gplot = gplotSimpleXY1(NULL, na, GPLOT_LINES, GPLOT_PNG, buf, title);
+ if (!gplot)
+ return (PIX *)ERROR_PTR("failed to generate plot", __func__, NULL);
+@@ -805,7 +805,7 @@
+ return (PIX *)ERROR_PTR("both na1, na2 not defined", __func__, NULL);
+
+ lept_mkdir("lept/gplot/pix");
+- snprintf(buf, sizeof(buf), "/tmp/lept/gplot/pix2.%d", index++);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/gplot/pix2.%d", index++);
+ gplot = gplotSimpleXY2(NULL, na1, na2, GPLOT_LINES, GPLOT_PNG, buf, title);
+ if (!gplot)
+ return (PIX *)ERROR_PTR("failed to generate plot", __func__, NULL);
+@@ -846,7 +846,7 @@
+ return (PIX *)ERROR_PTR("naa not defined", __func__, NULL);
+
+ lept_mkdir("lept/gplot/pix");
+- snprintf(buf, sizeof(buf), "/tmp/lept/gplot/pixN.%d", index++);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/gplot/pixN.%d", index++);
+ gplot = gplotSimpleXYN(NULL, naa, GPLOT_LINES, GPLOT_PNG, buf, title);
+ if (!gplot)
+ return (PIX *)ERROR_PTR("failed to generate plot", __func__, NULL);
+diff -Nura leptonica-1.83.1/src/gplot.h leptonica-1.83.1-patch/src/gplot.h
+--- leptonica-1.83.1/src/gplot.h 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/gplot.h 2024-09-05 14:26:11.079616965 +0800
+@@ -36,8 +36,8 @@
+ * We used to support X11 output, but recent versions of gnuplot do not
+ * support the X11 terminal. To get display to your screen, use
+ * GPLOT_PNG output; e.g.,
+- * gplotSimple1(na, GPLOT_PNG, "/tmp/someroot", ...);
+- * l_fileDisplay("/tmp/someroot.png", ...);
++ * gplotSimple1(na, GPLOT_PNG, "/data/local/tmp/someroot", ...);
++ * l_fileDisplay("/data/local/tmp/someroot.png", ...);
+ *
+ */
+
+diff -Nura leptonica-1.83.1/src/jbclass.c leptonica-1.83.1-patch/src/jbclass.c
+--- leptonica-1.83.1/src/jbclass.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/jbclass.c 2024-09-05 14:26:11.079616965 +0800
+@@ -1521,14 +1521,14 @@
+ L_INFO("Best dilation: %d\n", __func__, L_MAX(3, ibest + 1));
+ naseq = numaMakeSequence(1, 1, numaGetCount(nacc));
+ pix3 = gplotGeneralPix2(naseq, nacc, GPLOT_LINES,
+- "/tmp/lept/jb/numcc",
++ "/data/local/tmp/lept/jb/numcc",
+ "Number of cc vs. horizontal dilation",
+ "Sel horiz", "Number of cc");
+ pixaAddPix(pixadb, pix3, L_INSERT);
+ numaDestroy(&naseq);
+ naseq = numaMakeSequence(1, 1, numaGetCount(nadiff));
+ pix3 = gplotGeneralPix2(naseq, nadiff, GPLOT_LINES,
+- "/tmp/lept/jb/diffcc",
++ "/data/local/tmp/lept/jb/diffcc",
+ "Diff count of cc vs. horizontal dilation",
+ "Sel horiz", "Diff in cc");
+ pixaAddPix(pixadb, pix3, L_INSERT);
+@@ -2060,7 +2060,7 @@
+ jbdata->napage = napage;
+ jbdata->ptaul = ptaul;
+
+- LEPT_FREE(data);
++ // LEPT_FREE(data);
+ sarrayDestroy(&sa);
+ return jbdata;
+ }
+diff -Nura leptonica-1.83.1/src/morphseq.c leptonica-1.83.1-patch/src/morphseq.c
+--- leptonica-1.83.1/src/morphseq.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/morphseq.c 2024-09-05 14:26:11.079616965 +0800
+@@ -241,7 +241,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+@@ -407,7 +407,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+@@ -554,7 +554,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+@@ -701,7 +701,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+@@ -1044,7 +1044,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+@@ -1218,7 +1218,7 @@
+ }
+
+ if (pdfout) {
+- snprintf(fname, sizeof(fname), "/tmp/lept/seq_output_%d.pdf",
++ snprintf(fname, sizeof(fname), "/data/local/tmp/lept/seq_output_%d.pdf",
+ L_ABS(dispsep));
+ pixaConvertToPdf(pixa, 0, 1.0, L_FLATE_ENCODE, 0, fname, fname);
+ pixaDestroy(&pixa);
+diff -Nura leptonica-1.83.1/src/numafunc2.c leptonica-1.83.1-patch/src/numafunc2.c
+--- leptonica-1.83.1/src/numafunc2.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/numafunc2.c 2024-09-05 14:26:11.083616887 +0800
+@@ -2080,7 +2080,7 @@
+ if (pnascore) { /* debug mode */
+ lept_stderr("minrange = %d, maxrange = %d\n", minrange, maxrange);
+ lept_stderr("minval = %10.0f\n", minval);
+- gplotSimple1(nascore, GPLOT_PNG, "/tmp/lept/nascore",
++ gplotSimple1(nascore, GPLOT_PNG, "/data/local/tmp/lept/nascore",
+ "Score for split distribution");
+ *pnascore = nascore;
+ } else {
+diff -Nura leptonica-1.83.1/src/pageseg.c leptonica-1.83.1-patch/src/pageseg.c
+--- leptonica-1.83.1/src/pageseg.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/pageseg.c 2024-09-05 14:26:11.087616808 +0800
+@@ -219,7 +219,7 @@
+ PTAA *ptaa;
+ ptaa = pixGetOuterBordersPtaa(pixtb);
+ lept_mkdir("lept/pageseg");
+- ptaaWriteDebug("/tmp/lept/pageseg/tb_outlines.ptaa", ptaa, 1);
++ ptaaWriteDebug("/data/local/tmp/lept/pageseg/tb_outlines.ptaa", ptaa, 1);
+ pix1 = pixRenderRandomCmapPtaa(pixtb, ptaa, 1, 16, 1);
+ cmap = pixGetColormap(pix1);
+ pixcmapResetColor(cmap, 0, 130, 130, 130);
+@@ -233,17 +233,17 @@
+ bahm = pixConnComp(pixhm, NULL, 4);
+ batm = pixConnComp(pixtm, NULL, 4);
+ batb = pixConnComp(pixtb, NULL, 4);
+- boxaWriteDebug("/tmp/lept/pageseg/htmask.boxa", bahm);
+- boxaWriteDebug("/tmp/lept/pageseg/textmask.boxa", batm);
+- boxaWriteDebug("/tmp/lept/pageseg/textblock.boxa", batb);
++ boxaWriteDebug("/data/local/tmp/lept/pageseg/htmask.boxa", bahm);
++ boxaWriteDebug("/data/local/tmp/lept/pageseg/textmask.boxa", batm);
++ boxaWriteDebug("/data/local/tmp/lept/pageseg/textblock.boxa", batb);
+ boxaDestroy(&bahm);
+ boxaDestroy(&batm);
+ boxaDestroy(&batb);
+ }
+ if (pixadb) {
+ pixaConvertToPdf(pixadb, 0, 1.0, 0, 0, "Debug page segmentation",
+- "/tmp/lept/pageseg/debug.pdf");
+- L_INFO("Writing debug pdf to /tmp/lept/pageseg/debug.pdf\n", __func__);
++ "/data/local/tmp/lept/pageseg/debug.pdf");
++ L_INFO("Writing debug pdf to /data/local/tmp/lept/pageseg/debug.pdf\n", __func__);
+ }
+
+ if (ppixhm)
+@@ -850,7 +850,7 @@
+ #if 0
+ if (ppixdebug && nsplit > 0) {
+ lept_mkdir("lept/split");
+- gplotSimple1(na1, GPLOT_PNG, "/tmp/lept/split/split", NULL);
++ gplotSimple1(na1, GPLOT_PNG, "/data/local/tmp/lept/split/split", NULL);
+ }
+ #endif
+
+@@ -1277,8 +1277,8 @@
+ na1 = pixCountByColumn(pix4, NULL);
+
+ if (pixadb) {
+- gplotSimple1(na1, GPLOT_PNG, "/tmp/lept/plot", NULL);
+- pix5 = pixRead("/tmp/lept/plot.png");
++ gplotSimple1(na1, GPLOT_PNG, "/data/local/tmp/lept/plot", NULL);
++ pix5 = pixRead("/data/local/tmp/lept/plot.png");
+ pixaAddPix(pixadb, pix5, L_INSERT);
+ }
+
+@@ -2319,11 +2319,11 @@
+ if (box5) pixRenderBoxArb(pixdb2, box5, 4, 0, 0, 255);
+ pixaAddPix(pixadb, pixdb2, L_INSERT);
+ res = pixGetXRes(pixs);
+- L_INFO("Writing debug files to /tmp/lept/rect/\n", __func__);
++ L_INFO("Writing debug files to /data/local/tmp/lept/rect/\n", __func__);
+ pixaConvertToPdf(pixadb, res, 1.0, L_DEFAULT_ENCODE, 75, NULL,
+- "/tmp/lept/rect/fitrect.pdf");
++ "/data/local/tmp/lept/rect/fitrect.pdf");
+ pix1 = pixaDisplayTiledAndScaled(pixadb, 32, 800, 1, 0, 40, 2);
+- pixWrite("/tmp/lept/rect/fitrect.png", pix1, IFF_PNG);
++ pixWrite("/data/local/tmp/lept/rect/fitrect.png", pix1, IFF_PNG);
+ pixDestroy(&pix1);
+ pixDestroy(&pixdb1);
+ pixaDestroy(&pixadb);
+diff -Nura leptonica-1.83.1/src/pix3.c leptonica-1.83.1-patch/src/pix3.c
+--- leptonica-1.83.1/src/pix3.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/pix3.c 2024-09-05 14:26:11.087616808 +0800
+@@ -1385,9 +1385,9 @@
+ if (debug) {
+ lept_rmdir("masknear"); /* erase previous images */
+ lept_mkdir("masknear");
+- pixWriteDebug("/tmp/masknear/input.png", pix1, IFF_PNG);
+- pixWriteDebug("/tmp/masknear/adjusted.png", pix2, IFF_PNG);
+- pixWriteDebug("/tmp/masknear/outerfive.png", pix3, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/masknear/input.png", pix1, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/masknear/adjusted.png", pix2, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/masknear/outerfive.png", pix3, IFF_PNG);
+ lept_stderr("Input box; with adjusted sides; clipped\n");
+ boxPrintStreamInfo(stderr, box);
+ boxPrintStreamInfo(stderr, box1);
+diff -Nura leptonica-1.83.1/src/pix4.c leptonica-1.83.1-patch/src/pix4.c
+--- leptonica-1.83.1/src/pix4.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/pix4.c 2024-09-05 14:26:11.087616808 +0800
+@@ -2604,7 +2604,7 @@
+ }
+ if (array && pixadb) {
+ pixd = pixDisplayColorArray(array, nbins, 200, 5, fontsize);
+- pixWriteDebug("/tmp/lept/regout/rankhisto.png", pixd, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/regout/rankhisto.png", pixd, IFF_PNG);
+ pixDestroy(&pixd);
+ }
+
+@@ -3465,7 +3465,7 @@
+
+ if (ppixdb) {
+ lept_mkdir("lept/redout");
+- gplot = gplotCreate("/tmp/lept/redout/histplot", GPLOT_PNG, "Histogram",
++ gplot = gplotCreate("/data/local/tmp/lept/redout/histplot", GPLOT_PNG, "Histogram",
+ "Grayscale value", "Number of pixels");
+ gplotAddPlot(gplot, NULL, na, GPLOT_LINES, NULL);
+ nax = numaMakeConstant(thresh, 2);
+diff -Nura leptonica-1.83.1/src/pixafunc2.c leptonica-1.83.1-patch/src/pixafunc2.c
+--- leptonica-1.83.1/src/pixafunc2.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/pixafunc2.c 2024-09-05 14:26:11.087616808 +0800
+@@ -865,7 +865,7 @@
+ }
+ if (boxaWriteMem(&data, &size, boxa) == 0)
+ pixSetText(pixd, (char *)data); /* data is ascii */
+- LEPT_FREE(data);
++ // LEPT_FREE(data);
+ boxaDestroy(&boxa);
+
+ numaDestroy(&nainrow);
+@@ -990,7 +990,7 @@
+ /* Save the boxa in the text field of the output pix */
+ if (boxaWriteMem(&data, &size, boxa) == 0)
+ pixSetText(pixd, (char *)data); /* data is ascii */
+- LEPT_FREE(data);
++ // LEPT_FREE(data);
+
+ pixaDestroy(&pixa2);
+ return pixd;
+@@ -2329,7 +2329,7 @@
+ *
+ * Notes:
+ * (1) For each requested output, %nsplit files are written into
+- * directory /tmp/lept/split/.
++ * directory /data/local/tmp/lept/split/.
+ * (2) This is useful when a pixa is so large that the images
+ * are not conveniently displayed as a single tiled image at
+ * full resolution.
+@@ -2370,17 +2370,17 @@
+ pixDestroy(&pix1);
+ }
+ if (write_pixa) {
+- snprintf(buf, sizeof(buf), "/tmp/lept/split/split%d.pa", i + 1);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/split/split%d.pa", i + 1);
+ pixaWriteDebug(buf, pixa1);
+ }
+ if (write_pix) {
+- snprintf(buf, sizeof(buf), "/tmp/lept/split/split%d.tif", i + 1);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/split/split%d.tif", i + 1);
+ pix1 = pixaDisplayTiledInRows(pixa1, 1, outwidth, 1.0, 0, 20, 2);
+ pixWriteDebug(buf, pix1, IFF_TIFF_G4);
+ pixDestroy(&pix1);
+ }
+ if (write_pdf) {
+- snprintf(buf, sizeof(buf), "/tmp/lept/split/split%d.pdf", i + 1);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/split/split%d.pdf", i + 1);
+ pixaConvertToPdf(pixa1, 0, 1.0, L_G4_ENCODE, 0, buf, buf);
+ }
+ pixaDestroy(&pixa1);
+@@ -2405,7 +2405,7 @@
+ * use 0 for no border
+ * \param[in] fontsize to print tail of filename with image. Valid set is
+ * {4,6,8,10,12,14,16,18,20}. Use 0 to disable.
+- * \param[in] outdir subdirectory of /tmp to put N-up tiled images
++ * \param[in] outdir subdirectory of /data/local/tmp to put N-up tiled images
+ * \return 0 if OK, 1 on error
+ *
+ *
+diff -Nura leptonica-1.83.1/src/pixcomp.c leptonica-1.83.1-patch/src/pixcomp.c
+--- leptonica-1.83.1/src/pixcomp.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/pixcomp.c 2024-09-05 14:26:11.087616808 +0800
+@@ -2330,7 +2330,7 @@
+ * \brief pixacompWriteFiles()
+ *
+ * \param[in] pixac
+- * \param[in] subdir subdirectory of /tmp
++ * \param[in] subdir subdirectory of /data/local/tmp
+ * \return 0 if OK, 1 on error
+ */
+ l_ok
+@@ -2350,7 +2350,7 @@
+ n = pixacompGetCount(pixac);
+ for (i = 0; i < n; i++) {
+ pixc = pixacompGetPixcomp(pixac, i, L_NOCOPY);
+- snprintf(buf, sizeof(buf), "/tmp/%s/%03d", subdir, i);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/%s/%03d", subdir, i);
+ pixcompWriteFile(buf, pixc);
+ }
+ return 0;
+diff -Nura leptonica-1.83.1/src/ptafunc1.c leptonica-1.83.1-patch/src/ptafunc1.c
+--- leptonica-1.83.1/src/ptafunc1.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/ptafunc1.c 2024-09-05 14:26:11.091616730 +0800
+@@ -1858,13 +1858,13 @@
+ numaAddNumber(nab, bval);
+ }
+
+- snprintf(buffer, sizeof(buffer), "/tmp/lept/plot/%03d", count++);
++ snprintf(buffer, sizeof(buffer), "/data/local/tmp/lept/plot/%03d", count++);
+ rtitle = stringJoin("Red: ", title);
+ gplotSimple1(nar, outformat, buffer, rtitle);
+- snprintf(buffer, sizeof(buffer), "/tmp/lept/plot/%03d", count++);
++ snprintf(buffer, sizeof(buffer), "/data/local/tmp/lept/plot/%03d", count++);
+ gtitle = stringJoin("Green: ", title);
+ gplotSimple1(nag, outformat, buffer, gtitle);
+- snprintf(buffer, sizeof(buffer), "/tmp/lept/plot/%03d", count++);
++ snprintf(buffer, sizeof(buffer), "/data/local/tmp/lept/plot/%03d", count++);
+ btitle = stringJoin("Blue: ", title);
+ gplotSimple1(nab, outformat, buffer, btitle);
+ numaDestroy(&nar);
+@@ -1885,7 +1885,7 @@
+ numaAddNumber(na, (l_float32)val);
+ }
+
+- snprintf(buffer, sizeof(buffer), "/tmp/lept/plot/%03d", count++);
++ snprintf(buffer, sizeof(buffer), "/data/local/tmp/lept/plot/%03d", count++);
+ gplotSimple1(na, outformat, buffer, title);
+ numaDestroy(&na);
+ }
+diff -Nura leptonica-1.83.1/src/readbarcode.c leptonica-1.83.1-patch/src/readbarcode.c
+--- leptonica-1.83.1/src/readbarcode.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/readbarcode.c 2024-09-05 14:26:11.091616730 +0800
+@@ -234,7 +234,7 @@
+
+ #if DEBUG_DESKEW
+ pix3 = pixaDisplayTiledInRows(pixa, 8, 1000, 1.0, 0, 30, 2);
+- pixWrite("/tmp/lept/pix3.png", pix3, IFF_PNG);
++ pixWrite("/data/local/tmp/lept/pix3.png", pix3, IFF_PNG);
+ pixDestroy(&pix3);
+ #endif /* DEBUG_DESKEW */
+
+@@ -742,7 +742,7 @@
+
+ if (debugflag) {
+ lept_mkdir("lept/barcode");
+- gplot = gplotCreate("/tmp/lept/barcode/signal", GPLOT_PNG,
++ gplot = gplotCreate("/data/local/tmp/lept/barcode/signal", GPLOT_PNG,
+ "Pixel values", "dist in pixels", "value");
+ gplotAddPlot(gplot, nax, nay, GPLOT_LINES, "plot 1");
+ gplotMakeOutput(gplot);
+@@ -891,7 +891,7 @@
+
+ if (debugflag) {
+ lept_mkdir("lept/barcode");
+- gplot = gplotCreate("/tmp/lept/barcode/histw", GPLOT_PNG,
++ gplot = gplotCreate("/data/local/tmp/lept/barcode/histw", GPLOT_PNG,
+ "Raw width histogram", "Width", "Number");
+ gplotAddPlot(gplot, NULL, naehist, GPLOT_LINES, "plot black");
+ gplotAddPlot(gplot, NULL, naohist, GPLOT_LINES, "plot white");
+diff -Nura leptonica-1.83.1/src/readfile.c leptonica-1.83.1-patch/src/readfile.c
+--- leptonica-1.83.1/src/readfile.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/readfile.c 2024-09-05 14:26:11.091616730 +0800
+@@ -79,21 +79,21 @@
+ #include "allheaders.h"
+
+ /* Output files for ioFormatTest(). */
+-static const char *FILE_BMP = "/tmp/lept/format/file.bmp";
+-static const char *FILE_PNG = "/tmp/lept/format/file.png";
+-static const char *FILE_PNM = "/tmp/lept/format/file.pnm";
+-static const char *FILE_G3 = "/tmp/lept/format/file_g3.tif";
+-static const char *FILE_G4 = "/tmp/lept/format/file_g4.tif";
+-static const char *FILE_RLE = "/tmp/lept/format/file_rle.tif";
+-static const char *FILE_PB = "/tmp/lept/format/file_packbits.tif";
+-static const char *FILE_LZW = "/tmp/lept/format/file_lzw.tif";
+-static const char *FILE_ZIP = "/tmp/lept/format/file_zip.tif";
+-static const char *FILE_TIFF_JPEG = "/tmp/lept/format/file_jpeg.tif";
+-static const char *FILE_TIFF = "/tmp/lept/format/file.tif";
+-static const char *FILE_JPG = "/tmp/lept/format/file.jpg";
+-static const char *FILE_GIF = "/tmp/lept/format/file.gif";
+-static const char *FILE_WEBP = "/tmp/lept/format/file.webp";
+-static const char *FILE_JP2K = "/tmp/lept/format/file.jp2";
++static const char *FILE_BMP = "/data/local/tmp/lept/format/file.bmp";
++static const char *FILE_PNG = "/data/local/tmp/lept/format/file.png";
++static const char *FILE_PNM = "/data/local/tmp/lept/format/file.pnm";
++static const char *FILE_G3 = "/data/local/tmp/lept/format/file_g3.tif";
++static const char *FILE_G4 = "/data/local/tmp/lept/format/file_g4.tif";
++static const char *FILE_RLE = "/data/local/tmp/lept/format/file_rle.tif";
++static const char *FILE_PB = "/data/local/tmp/lept/format/file_packbits.tif";
++static const char *FILE_LZW = "/data/local/tmp/lept/format/file_lzw.tif";
++static const char *FILE_ZIP = "/data/local/tmp/lept/format/file_zip.tif";
++static const char *FILE_TIFF_JPEG = "/data/local/tmp/lept/format/file_jpeg.tif";
++static const char *FILE_TIFF = "/data/local/tmp/lept/format/file.tif";
++static const char *FILE_JPG = "/data/local/tmp/lept/format/file.jpg";
++static const char *FILE_GIF = "/data/local/tmp/lept/format/file.gif";
++static const char *FILE_WEBP = "/data/local/tmp/lept/format/file.webp";
++static const char *FILE_JP2K = "/data/local/tmp/lept/format/file.jp2";
+
+ /* There are two jp2 formats, and two codecs associated with them:
+ * OPJ_CODEC_J2K (L_J2K_CODEC) is associated with JP2K_CODESTREAM
+@@ -1244,7 +1244,7 @@
+ *
+ * Notes:
+ * (1) This writes and reads a set of output files losslessly
+- * in different formats to /tmp/format/, and tests that the
++ * in different formats to /data/local/tmp/format/, and tests that the
+ * result before and after is unchanged.
+ * (2) This should work properly on input images of any depth,
+ * with and without colormaps.
+diff -Nura leptonica-1.83.1/src/recogident.c leptonica-1.83.1-patch/src/recogident.c
+--- leptonica-1.83.1/src/recogident.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/recogident.c 2024-09-05 14:26:11.095616652 +0800
+@@ -342,7 +342,7 @@
+ boxaDestroy(&boxa1);
+ if (pixa) { /* debug */
+ pix3 = pixaDisplayTiledInColumns(pixa, 1, 1.0, 20, 2);
+- snprintf(buf, sizeof(buf), "/tmp/lept/recog/decode-%d.png", ind++);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/recog/decode-%d.png", ind++);
+ pixWrite(buf, pix3, IFF_PNG);
+ pixaDestroy(&pixa);
+ pixDestroy(&pix3);
+@@ -828,7 +828,7 @@
+ lept_mkdir("lept/recog");
+ pixt1 = fpixDisplayMaxDynamicRange(fpix);
+ pixt2 = pixExpandReplicate(pixt1, 5);
+- snprintf(buf, sizeof(buf), "/tmp/lept/recog/junkbs_%d.png", debugflag);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/recog/junkbs_%d.png", debugflag);
+ pixWrite(buf, pixt2, IFF_PNG);
+ pixDestroy(&pixt1);
+ pixDestroy(&pixt2);
+diff -Nura leptonica-1.83.1/src/recogtrain.c leptonica-1.83.1-patch/src/recogtrain.c
+--- leptonica-1.83.1/src/recogtrain.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/recogtrain.c 2024-09-05 14:26:11.095616652 +0800
+@@ -1984,14 +1984,14 @@
+ if (display) {
+ lept_mkdir("lept/recog");
+ pix = pixaaDisplayByPixa(recog->pixaa_u, 50, 1.0, 20, 20, 0);
+- snprintf(buf, sizeof(buf), "/tmp/lept/recog/templates_u.%d.png", index);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/recog/templates_u.%d.png", index);
+ pixWriteDebug(buf, pix, IFF_PNG);
+ pixDisplay(pix, 0, 200 * index);
+ pixDestroy(&pix);
+ if (recog->train_done) {
+ pix = pixaaDisplayByPixa(recog->pixaa, 50, 1.0, 20, 20, 0);
+ snprintf(buf, sizeof(buf),
+- "/tmp/lept/recog/templates.%d.png", index);
++ "/data/local/tmp/lept/recog/templates.%d.png", index);
+ pixWriteDebug(buf, pix, IFF_PNG);
+ pixDisplay(pix, 800, 200 * index);
+ pixDestroy(&pix);
+@@ -2068,7 +2068,7 @@
+ recog->pixdb_ave = pixaaDisplayByPixa(paa2, 50, 1.0, 20, 20, 0);
+ if (debug % 2) {
+ lept_mkdir("lept/recog");
+- pixWriteDebug("/tmp/lept/recog/templ_match.png", recog->pixdb_ave,
++ pixWriteDebug("/data/local/tmp/lept/recog/templ_match.png", recog->pixdb_ave,
+ IFF_PNG);
+ pixDisplay(recog->pixdb_ave, 100, 100);
+ }
+diff -Nura leptonica-1.83.1/src/regutils.c leptonica-1.83.1-patch/src/regutils.c
+--- leptonica-1.83.1/src/regutils.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/regutils.c 2024-09-05 14:26:11.099616574 +0800
+@@ -101,7 +101,7 @@
+ * the results to a file. The output, which includes
+ * logging of all reg test failures plus a SUCCESS or
+ * FAILURE summary for each test, is appended to the file
+- * "/tmp/lept/reg_results.txt. For this case, as in Case 2,
++ * "/data/local/tmp/lept/reg_results.txt. For this case, as in Case 2,
+ * the display field in rp is set to FALSE, preventing
+ * image display.
+ * Case 2:
+@@ -154,7 +154,7 @@
+ /* Only open a stream to a temp file for the 'compare' case */
+ if (argc == 1 || !strcmp(argv[1], "compare")) {
+ rp->mode = L_REG_COMPARE;
+- rp->tempfile = stringNew("/tmp/lept/regout/regtest_output.txt");
++ rp->tempfile = stringNew("/data/local/tmp/lept/regout/regtest_output.txt");
+ rp->fp = fopenWriteStream(rp->tempfile, "wb");
+ if (rp->fp == NULL) {
+ rp->success = FALSE;
+@@ -200,7 +200,7 @@
+ *
+ * Notes:
+ * (1) This copies anything written to the temporary file to the
+- * output file /tmp/lept/reg_results.txt.
++ * output file /data/local/tmp/lept/reg_results.txt.
+ *
+ */
+ l_ok
+@@ -243,7 +243,7 @@
+ snprintf(result, sizeof(result), "FAILURE: %s_reg\n", rp->testname);
+ message = stringJoin(text, result);
+ LEPT_FREE(text);
+- results_file = stringNew("/tmp/lept/reg_results.txt");
++ results_file = stringNew("/data/local/tmp/lept/reg_results.txt");
+ fileAppendString(results_file, message);
+ retval = (rp->success) ? 0 : 1;
+ LEPT_FREE(results_file);
+@@ -326,15 +326,15 @@
+ /* Output on failure */
+ if (!same) {
+ /* Write the two strings to file */
+- snprintf(buf, sizeof(buf), "/tmp/lept/regout/string1_%d_%zu",
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/regout/string1_%d_%zu",
+ rp->index, bytes1);
+ l_binaryWrite(buf, "w", string1, bytes1);
+- snprintf(buf, sizeof(buf), "/tmp/lept/regout/string2_%d_%zu",
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/regout/string2_%d_%zu",
+ rp->index, bytes2);
+ l_binaryWrite(buf, "w", string2, bytes2);
+
+ /* Report comparison failure */
+- snprintf(buf, sizeof(buf), "/tmp/lept/regout/string*_%d_*", rp->index);
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/regout/string*_%d_*", rp->index);
+ if (rp->fp) {
+ fprintf(rp->fp,
+ "Failure in %s_reg: string comp for index %d; "
+@@ -474,14 +474,14 @@
+ * * "compare": compares %localname contents with the golden file
+ * * "display": this does nothing
+ * (2) The canonical format of the golden filenames is:
+- * /tmp/lept/golden/[root of main name]_golden.[index].
++ * /data/local/tmp/lept/golden/[root of main name]_golden.[index].
+ * [ext of localname]
+ * e.g.,
+- * /tmp/lept/golden/maze_golden.0.png
+- * (3) The local file can be made in any subdirectory of /tmp/lept,
+- * including /tmp/lept/regout/.
++ * /data/local/tmp/lept/golden/maze_golden.0.png
++ * (3) The local file can be made in any subdirectory of /data/local/tmp/lept,
++ * including /data/local/tmp/lept/regout/.
+ * (4) It is important to add an extension to the local name, such as
+- * /tmp/lept/maze/file1.png (extension ".png")
++ * /data/local/tmp/lept/maze/file1.png (extension ".png")
+ * because the extension is added to the name of the golden file.
+ *
+ */
+@@ -512,7 +512,7 @@
+
+ /* Generate the golden file name; used in 'generate' and 'compare' */
+ splitPathAtExtension(localname, NULL, &ext);
+- snprintf(namebuf, sizeof(namebuf), "/tmp/lept/golden/%s_golden.%02d%s",
++ snprintf(namebuf, sizeof(namebuf), "/data/local/tmp/lept/golden/%s_golden.%02d%s",
+ rp->testname, rp->index, ext);
+ LEPT_FREE(ext);
+
+@@ -585,10 +585,10 @@
+ * Notes:
+ * (1) This only does something in "compare" mode.
+ * (2) The canonical format of the golden filenames is:
+- * /tmp/lept/golden/[root of main name]_golden.[index].
++ * /data/local/tmp/lept/golden/[root of main name]_golden.[index].
+ * [ext of localname]
+ * e.g.,
+- * /tmp/lept/golden/maze_golden.0.png
++ * /data/local/tmp/lept/golden/maze_golden.0.png
+ *
+ */
+ l_ok
+@@ -617,7 +617,7 @@
+
+ /* Generate the golden file names */
+ snprintf(namebuf, sizeof(namebuf), "%s_golden.%02d", rp->testname, index1);
+- sa = getSortedPathnamesInDirectory("/tmp/lept/golden", namebuf, 0, 0);
++ sa = getSortedPathnamesInDirectory("/data/local/tmp/lept/golden", namebuf, 0, 0);
+ if (sarrayGetCount(sa) != 1) {
+ sarrayDestroy(&sa);
+ rp->success = FALSE;
+@@ -628,7 +628,7 @@
+ sarrayDestroy(&sa);
+
+ snprintf(namebuf, sizeof(namebuf), "%s_golden.%02d", rp->testname, index2);
+- sa = getSortedPathnamesInDirectory("/tmp/lept/golden", namebuf, 0, 0);
++ sa = getSortedPathnamesInDirectory("/data/local/tmp/lept/golden", namebuf, 0, 0);
+ if (sarrayGetCount(sa) != 1) {
+ sarrayDestroy(&sa);
+ rp->success = FALSE;
+@@ -673,9 +673,9 @@
+ * (b) make a local file and "compare" with the golden file
+ * (c) make a local file and "display" the results
+ * (2) The canonical format of the local filename is:
+- * /tmp/lept/regout/[root of main name].[count].[format extension]
++ * /data/local/tmp/lept/regout/[root of main name].[count].[format extension]
+ * e.g., for scale_reg,
+- * /tmp/lept/regout/scale.0.png
++ * /data/local/tmp/lept/regout/scale.0.png
+ * The golden file name mirrors this in the usual way.
+ * (3) The check is done between the written files, which requires
+ * the files to be identical. The exception is for GIF, which
+@@ -705,7 +705,7 @@
+ changeFormatForMissingLib(&format);
+
+ /* Generate the local file name */
+- snprintf(namebuf, sizeof(namebuf), "/tmp/lept/regout/%s.%02d.%s",
++ snprintf(namebuf, sizeof(namebuf), "/data/local/tmp/lept/regout/%s.%02d.%s",
+ rp->testname, rp->index + 1, ImageFileFormatExtensions[format]);
+
+ /* Write the local file */
+@@ -739,9 +739,9 @@
+ * (b) make a local file and "compare" with the golden file
+ * (c) make a local file and "display" the results
+ * (2) The canonical format of the local filename is:
+- * /tmp/lept/regout/[root of main name].[count].[ext]
++ * /data/local/tmp/lept/regout/[root of main name].[count].[ext]
+ * e.g., for the first boxaa in quadtree_reg,
+- * /tmp/lept/regout/quadtree.0.baa
++ * /data/local/tmp/lept/regout/quadtree.0.baa
+ * The golden file name mirrors this in the usual way.
+ * (3) The data can be anything. It is most useful for serialized
+ * output of data, such as boxa, pta, etc.
+@@ -767,7 +767,7 @@
+ }
+
+ /* Generate the local file name */
+- snprintf(namebuf, sizeof(namebuf), "/tmp/lept/regout/%s.%02d.%s",
++ snprintf(namebuf, sizeof(namebuf), "/data/local/tmp/lept/regout/%s.%02d.%s",
+ rp->testname, rp->index + 1, ext);
+
+ /* Write the local file */
+@@ -812,7 +812,7 @@
+ return (char *)ERROR_PTR("rp not defined", __func__, NULL);
+
+ ind = (index >= 0) ? index : rp->index;
+- snprintf(buf, sizeof(buf), "/tmp/lept/regout/%s.%02d.%s",
++ snprintf(buf, sizeof(buf), "/data/local/tmp/lept/regout/%s.%02d.%s",
+ rp->testname, ind, ImageFileFormatExtensions[format]);
+ return stringNew(buf);
+ }
+diff -Nura leptonica-1.83.1/src/regutils.h leptonica-1.83.1-patch/src/regutils.h
+--- leptonica-1.83.1/src/regutils.h 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/regutils.h 2024-09-05 14:26:11.099616574 +0800
+@@ -49,7 +49,7 @@
+ * Using 'compare' on the command line is optional.
+ *
+ * Case 2: distance_reg generate
+- * This generates golden files in /tmp for the reg test.
++ * This generates golden files in /data/local/tmp for the reg test.
+ *
+ * Case 3: distance_reg display
+ * This runs the test but makes no comparison of the output
+diff -Nura leptonica-1.83.1/src/sel2.c leptonica-1.83.1-patch/src/sel2.c
+--- leptonica-1.83.1/src/sel2.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/sel2.c 2024-09-05 14:26:11.099616574 +0800
+@@ -513,11 +513,11 @@
+ lept_mkdir("lept/sel");
+ pixaGetPixDimensions(pixa, 0, &w, NULL, NULL);
+ pixt = pixaDisplayTiledAndScaled(pixa, 32, w, 1, 0, 10, 2);
+- pixWriteDebug("/tmp/lept/sel/xsel1.png", pixt, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/sel/xsel1.png", pixt, IFF_PNG);
+ pixDisplay(pixt, 0, 100);
+ pixDestroy(&pixt);
+ pixt = selaDisplayInPix(sela, 15, 2, 20, 1);
+- pixWriteDebug("/tmp/lept/sel/xsel2.png", pixt, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/sel/xsel2.png", pixt, IFF_PNG);
+ pixDisplay(pixt, 500, 100);
+ pixDestroy(&pixt);
+ selaWriteStream(stderr, sela);
+@@ -643,11 +643,11 @@
+ lept_mkdir("lept/sel");
+ pixaGetPixDimensions(pixa, 0, &w, NULL, NULL);
+ pixt = pixaDisplayTiledAndScaled(pixa, 32, w, 4, 0, 10, 2);
+- pixWriteDebug("/tmp/lept/sel/tsel1.png", pixt, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/sel/tsel1.png", pixt, IFF_PNG);
+ pixDisplay(pixt, 0, 100);
+ pixDestroy(&pixt);
+ pixt = selaDisplayInPix(sela, 15, 2, 20, 4);
+- pixWriteDebug("/tmp/lept/sel/tsel2.png", pixt, IFF_PNG);
++ pixWriteDebug("/data/local/tmp/lept/sel/tsel2.png", pixt, IFF_PNG);
+ pixDisplay(pixt, 500, 100);
+ pixDestroy(&pixt);
+ selaWriteStream(stderr, sela);
+diff -Nura leptonica-1.83.1/src/stringcode.c leptonica-1.83.1-patch/src/stringcode.c
+--- leptonica-1.83.1/src/stringcode.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/stringcode.c 2024-09-05 14:26:11.099616574 +0800
+@@ -205,7 +205,7 @@
+ *
+ * \param[in] filein containing filenames of serialized data
+ * \param[in] fileno integer that labels the two output files
+- * \param[in] outdir [optional] if null, files are made in /tmp/lept/auto
++ * \param[in] outdir [optional] if null, files are made in /data/local/tmp/lept/auto
+ * \return 0 if OK, 1 on error
+ *
+ *
+@@ -324,7 +324,7 @@
+ *
+ * \param[in,out] pstrcode destroys and sets to null after .c and .h files
+ * have been generated
+- * \param[in] outdir [optional] if NULL, make files in /tmp/lept/auto
++ * \param[in] outdir [optional] if NULL, make files in /data/local/tmp/lept/auto
+ * \return 0 if OK; 1 on error
+ */
+ l_int32
+@@ -344,8 +344,8 @@
+ return ERROR_INT("No input data", __func__, 1);
+ strcode = *pstrcode;
+ if (!outdir) {
+- L_INFO("no outdir specified; writing to /tmp/lept/auto\n", __func__);
+- realoutdir = stringNew("/tmp/lept/auto");
++ L_INFO("no outdir specified; writing to /data/local/tmp/lept/auto\n", __func__);
++ realoutdir = stringNew("/data/local/tmp/lept/auto");
+ } else {
+ realoutdir = stringNew(outdir);
+ }
+diff -Nura leptonica-1.83.1/src/stringtemplate1.txt leptonica-1.83.1-patch/src/stringtemplate1.txt
+--- leptonica-1.83.1/src/stringtemplate1.txt 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/stringtemplate1.txt 2024-09-05 14:26:11.099616574 +0800
+@@ -73,16 +73,16 @@
+ --- case 0:
+ --- data1 = decodeBase64(l_strdata_0, strlen(l_strdata_0), &size1);
+ --- data2 = zlibUncompress(data1, size1, &size2);
+---- l_binaryWrite("/tmp/lept/auto/data.bin", "w", data2, size2);
+---- result = (void *)pixaRead("/tmp/lept/auto/data.bin");
++--- l_binaryWrite("/data/local/tmp/lept/auto/data.bin", "w", data2, size2);
++--- result = (void *)pixaRead("/data/local/tmp/lept/auto/data.bin");
+ --- lept_free(data1);
+ --- lept_free(data2);
+ --- break;
+ --- case 1:
+ --- data1 = decodeBase64(l_strdata_1, strlen(l_strdata_1), &size1);
+ --- data2 = zlibUncompress(data1, size1, &size2);
+---- l_binaryWrite("/tmp/lept/auto/data.bin", "w", data2, size2);
+---- result = (void *)pixaRead("/tmp/lept/auto/data.bin");
++--- l_binaryWrite("/data/local/tmp/lept/auto/data.bin", "w", data2, size2);
++--- result = (void *)pixaRead("/data/local/tmp/lept/auto/data.bin");
+ --- lept_free(data1);
+ --- lept_free(data2);
+ --- break;
+diff -Nura leptonica-1.83.1/src/utils2.c leptonica-1.83.1-patch/src/utils2.c
+--- leptonica-1.83.1/src/utils2.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/utils2.c 2024-09-05 14:26:11.099616574 +0800
+@@ -134,16 +134,16 @@
+ * This is important:
+ * (1) With the exception of splitPathAtDirectory(), splitPathAtExtension()
+ * and genPathname(), all input pathnames must have unix separators.
+- * (2) On Windows, when you specify a read or write to "/tmp/...",
++ * (2) On Windows, when you specify a read or write to "/data/local/tmp/...",
+ * the filename is rewritten to use the Windows temp directory:
+- * /tmp ==> [Temp]... (Windows)
++ * /data/local/tmp ==> [Temp]... (Windows)
+ * (3) This filename rewrite, along with the conversion from unix
+ * to Windows pathnames, happens in genPathname().
+ * (4) Use fopenReadStream() and fopenWriteStream() to open files,
+ * because these use genPathname() to find the platform-dependent
+ * filenames. Likewise for l_binaryRead() and l_binaryWrite().
+ * (5) For moving, copying and removing files and directories that are in
+- * subdirectories of /tmp, use the lept_*() file system shell wrappers:
++ * subdirectories of /data/local/tmp, use the lept_*() file system shell wrappers:
+ * lept_mkdir(), lept_rmdir(), lept_mv(), lept_rm() and lept_cp().
+ * (6) Use the lept_*() C library wrappers. These work properly on
+ * Windows, where the same DLL must perform complementary operations
+@@ -165,7 +165,7 @@
+ * fopenWriteStream(); these call genPathname() to ensure that
+ * if it is a temp file, the correct path is used. To indicate
+ * that this is a temp file, the application is written with the
+- * root directory of the path in a canonical form: "/tmp".
++ * root directory of the path in a canonical form: "/data/local/tmp".
+ * (9) Why is it that multi-platform directory functions like lept_mkdir()
+ * and lept_rmdir(), as well as associated file functions like
+ * lept_rm(), lept_mv() and lept_cp(), only work in the temp dir?
+@@ -1778,7 +1778,7 @@
+ * (3) The output filenames are in the form:
+ * _N., N = 1, ... n
+ * (4) This handles the temp directory pathname conversion on Windows:
+- * /tmp ==> [Windows Temp directory]
++ * /data/local/tmp ==> [Windows Temp directory]
+ * (5) Files can also be sharded into sets of lines by the program 'split':
+ * split -n l/
+ * Using 'split', the resulting files have approximately equal
+@@ -1857,7 +1857,7 @@
+ * (1) This should be used whenever you want to run fopen() to
+ * read from a stream. Never call fopen() directory.
+ * (2) This handles the temp directory pathname conversion on Windows:
+- * /tmp ==> [Windows Temp directory]
++ * /data/local/tmp ==> [Windows Temp directory]
+ *
+ */
+ FILE *
+@@ -1898,7 +1898,7 @@
+ * (1) This should be used whenever you want to run fopen() to
+ * write or append to a stream. Never call fopen() directory.
+ * (2) This handles the temp directory pathname conversion on Windows:
+- * /tmp ==> [Windows Temp directory]
++ * /data/local/tmp ==> [Windows Temp directory]
+ *
+ */
+ FILE *
+@@ -2116,21 +2116,21 @@
+
+ /*--------------------------------------------------------------------*
+ * Multi-platform file system operations *
+- * [ These only write to /tmp or its subdirectories ] *
++ * [ These only write to /data/local/tmp or its subdirectories ] *
+ *--------------------------------------------------------------------*/
+ /*!
+ * \brief lept_mkdir()
+ *
+- * \param[in] subdir of /tmp or its equivalent on Windows
++ * \param[in] subdir of /data/local/tmp or its equivalent on Windows
+ * \return 0 on success, non-zero on failure
+ *
+ *
+ * Notes:
+ * (1) %subdir is a partial path that can consist of one or more
+ * directories.
+- * (2) This makes any subdirectories of /tmp that are required.
++ * (2) This makes any subdirectories of /data/local/tmp that are required.
+ * (3) The root temp directory is:
+- * /tmp (unix) [default]
++ * /data/local/tmp (unix) [default]
+ * [Temp] (Windows)
+ *
+ */
+@@ -2159,7 +2159,7 @@
+ sa = sarrayCreate(0);
+ sarraySplitString(sa, subdir, "/");
+ n = sarrayGetCount(sa);
+- dir = genPathname("/tmp", NULL);
++ dir = genPathname("/data/local/tmp", NULL);
+ /* Make sure the tmp directory exists */
+ #ifndef _WIN32
+ ret = mkdir(dir, 0777);
+@@ -2191,7 +2191,7 @@
+ /*!
+ * \brief lept_rmdir()
+ *
+- * \param[in] subdir of /tmp or its equivalent on Windows
++ * \param[in] subdir of /data/local/tmp or its equivalent on Windows
+ * \return 0 on success, non-zero on failure
+ *
+ *
+@@ -2200,7 +2200,7 @@
+ * directories.
+ * (2) This removes all files from the specified subdirectory of
+ * the root temp directory:
+- * /tmp (unix)
++ * /data/local/tmp (unix)
+ * [Temp] (Windows)
+ * and then removes the subdirectory.
+ * (3) The combination
+@@ -2225,7 +2225,7 @@
+ return ERROR_INT("subdir not an actual subdirectory", __func__, 1);
+
+ /* Find the temp subdirectory */
+- dir = pathJoin("/tmp", subdir);
++ dir = pathJoin("/data/local/tmp", subdir);
+ if (!dir)
+ return ERROR_INT("directory name not made", __func__, 1);
+ lept_direxists(dir, &exists);
+@@ -2250,7 +2250,7 @@
+ }
+
+ #ifndef _WIN32
+- realdir = genPathname("/tmp", subdir);
++ realdir = genPathname("/data/local/tmp", subdir);
+ ret = rmdir(realdir);
+ LEPT_FREE(realdir);
+ #else
+@@ -2275,10 +2275,10 @@
+ *
+ * Notes:
+ * (1) Always use unix pathname separators.
+- * (2) By calling genPathname(), if the pathname begins with "/tmp"
++ * (2) By calling genPathname(), if the pathname begins with "/data/local/tmp"
+ * this does an automatic directory translation on Windows
+ * to a path in the Windows [Temp] directory:
+- * "/tmp" ==> [Temp] (Windows)
++ * "/data/local/tmp" ==> [Temp] (Windows)
+ *
+ */
+ void
+@@ -2317,23 +2317,23 @@
+ /*!
+ * \brief lept_rm_match()
+ *
+- * \param[in] subdir [optional] if NULL, the removed files are in /tmp
++ * \param[in] subdir [optional] if NULL, the removed files are in /data/local/tmp
+ * \param[in] substr [optional] pattern to match in filename
+ * \return 0 on success, non-zero on failure
+ *
+ *
+ * Notes:
+- * (1) This removes the matched files in /tmp or a subdirectory of /tmp.
+- * Use NULL for %subdir if the files are in /tmp.
++ * (1) This removes the matched files in /data/local/tmp or a subdirectory of /data/local/tmp.
++ * Use NULL for %subdir if the files are in /data/local/tmp.
+ * (2) If %substr == NULL, this removes all files in the directory.
+ * If %substr == "" (empty), this removes no files.
+ * If both %subdir == NULL and %substr == NULL, this removes
+- * all files in /tmp.
++ * all files in /data/local/tmp.
+ * (3) Use unix pathname separators.
+- * (4) By calling genPathname(), if the pathname begins with "/tmp"
++ * (4) By calling genPathname(), if the pathname begins with "/data/local/tmp"
+ * this does an automatic directory translation on Windows
+ * to a path in the Windows [Temp] directory:
+- * "/tmp" ==> [Temp] (Windows)
++ * "/data/local/tmp" ==> [Temp] (Windows)
+ * (5) Error conditions:
+ * * returns -1 if the directory is not found
+ * * returns the number of files (> 0) that it was unable to remove.
+@@ -2376,7 +2376,7 @@
+ /*!
+ * \brief lept_rm()
+ *
+- * \param[in] subdir [optional] subdir of '/tmp'; can be NULL
++ * \param[in] subdir [optional] subdir of '/data/local/tmp'; can be NULL
+ * \param[in] tail filename without the directory
+ * \return 0 on success, non-zero on failure
+ *
+@@ -2384,7 +2384,7 @@
+ * Notes:
+ * (1) By calling genPathname(), this does an automatic directory
+ * translation on Windows to a path in the Windows [Temp] directory:
+- * "/tmp/..." ==> [Temp]/... (Windows)
++ * "/data/local/tmp/..." ==> [Temp]/... (Windows)
+ *
+ */
+ l_int32
+@@ -2421,7 +2421,7 @@
+ * (2) Use unix pathname separators.
+ * (3) There is no name translation.
+ * (4) Unlike the other lept_* functions in this section, this can remove
+- * any file -- it is not restricted to files that are in /tmp or a
++ * any file -- it is not restricted to files that are in /data/local/tmp or a
+ * subdirectory of it.
+ *
+ */
+@@ -2456,12 +2456,12 @@
+ *
+ *
+ * Notes:
+- * (1) This moves %srcfile to /tmp or to a subdirectory of /tmp.
++ * (1) This moves %srcfile to /data/local/tmp or to a subdirectory of /data/local/tmp.
+ * (2) %srcfile can either be a full path or relative to the
+ * current directory.
+- * (3) %newdir can either specify an existing subdirectory of /tmp
++ * (3) %newdir can either specify an existing subdirectory of /data/local/tmp
+ * or can be NULL. In the latter case, the file will be written
+- * into /tmp.
++ * into /data/local/tmp.
+ * (4) %newtail can either specify a filename tail or, if NULL,
+ * the filename is taken from src-tail, the tail of %srcfile.
+ * (5) For debugging, the computed newpath can be returned. It must
+@@ -2469,13 +2469,13 @@
+ * (6) Reminders:
+ * (a) specify files using unix pathnames
+ * (b) for Windows, translates
+- * /tmp ==> [Temp]
++ * /data/local/tmp ==> [Temp]
+ * where [Temp] is the Windows temp directory
+ * (7) Examples:
+- * * newdir = NULL, newtail = NULL ==> /tmp/src-tail
+- * * newdir = NULL, newtail = abc ==> /tmp/abc
+- * * newdir = def/ghi, newtail = NULL ==> /tmp/def/ghi/src-tail
+- * * newdir = def/ghi, newtail = abc ==> /tmp/def/ghi/abc
++ * * newdir = NULL, newtail = NULL ==> /data/local/tmp/src-tail
++ * * newdir = NULL, newtail = abc ==> /data/local/tmp/abc
++ * * newdir = def/ghi, newtail = NULL ==> /data/local/tmp/def/ghi/src-tail
++ * * newdir = def/ghi, newtail = abc ==> /data/local/tmp/def/ghi/abc
+ *
+ */
+ l_int32
+@@ -2491,9 +2491,9 @@
+ if (!srcfile)
+ return ERROR_INT("srcfile not defined", __func__, 1);
+
+- /* Require output pathname to be in /tmp/ or a subdirectory */
++ /* Require output pathname to be in /data/local/tmp/ or a subdirectory */
+ if (makeTempDirname(newtemp, sizeof(newtemp), newdir) == 1)
+- return ERROR_INT("newdir not NULL or a subdir of /tmp", __func__, 1);
++ return ERROR_INT("newdir not NULL or a subdir of /data/local/tmp", __func__, 1);
+
+ /* Get canonical src pathname */
+ splitPathAtDirectory(srcfile, &dir, &srctail);
+@@ -2552,12 +2552,12 @@
+ *
+ *
+ * Notes:
+- * (1) This copies %srcfile to /tmp or to a subdirectory of /tmp.
++ * (1) This copies %srcfile to /data/local/tmp or to a subdirectory of /data/local/tmp.
+ * (2) %srcfile can either be a full path or relative to the
+ * current directory.
+- * (3) %newdir can either specify an existing subdirectory of /tmp,
++ * (3) %newdir can either specify an existing subdirectory of /data/local/tmp,
+ * or can be NULL. In the latter case, the file will be written
+- * into /tmp.
++ * into /data/local/tmp.
+ * (4) %newtail can either specify a filename tail or, if NULL,
+ * the filename is taken from src-tail, the tail of %srcfile.
+ * (5) For debugging, the computed newpath can be returned. It must
+@@ -2565,13 +2565,13 @@
+ * (6) Reminders:
+ * (a) specify files using unix pathnames
+ * (b) for Windows, translates
+- * /tmp ==> [Temp]
++ * /data/local/tmp ==> [Temp]
+ * where [Temp] is the Windows temp directory
+ * (7) Examples:
+- * * newdir = NULL, newtail = NULL ==> /tmp/src-tail
+- * * newdir = NULL, newtail = abc ==> /tmp/abc
+- * * newdir = def/ghi, newtail = NULL ==> /tmp/def/ghi/src-tail
+- * * newdir = def/ghi, newtail = abc ==> /tmp/def/ghi/abc
++ * * newdir = NULL, newtail = NULL ==> /data/local/tmp/src-tail
++ * * newdir = NULL, newtail = abc ==> /data/local/tmp/abc
++ * * newdir = def/ghi, newtail = NULL ==> /data/local/tmp/def/ghi/src-tail
++ * * newdir = def/ghi, newtail = abc ==> /data/local/tmp/def/ghi/abc
+ *
+ *
+ */
+@@ -2588,9 +2588,9 @@
+ if (!srcfile)
+ return ERROR_INT("srcfile not defined", __func__, 1);
+
+- /* Require output pathname to be in /tmp or a subdirectory */
++ /* Require output pathname to be in /data/local/tmp or a subdirectory */
+ if (makeTempDirname(newtemp, sizeof(newtemp), newdir) == 1)
+- return ERROR_INT("newdir not NULL or a subdir of /tmp", __func__, 1);
++ return ERROR_INT("newdir not NULL or a subdir of /data/local/tmp", __func__, 1);
+
+ /* Get canonical src pathname */
+ splitPathAtDirectory(srcfile, &dir, &srctail);
+@@ -2705,14 +2705,14 @@
+ * tail ptr.
+ * (3) This function makes decisions based only on the lexical
+ * structure of the input. Examples:
+- * /usr/tmp/abc.d --> dir: /usr/tmp/ tail: abc.d
+- * /usr/tmp/ --> dir: /usr/tmp/ tail: [empty string]
+- * /usr/tmp --> dir: /usr/ tail: tmp
++ * /usr/data/local/tmp/abc.d --> dir: /usr/data/local/tmp/ tail: abc.d
++ * /usr/data/local/tmp/ --> dir: /usr/data/local/tmp/ tail: [empty string]
++ * /usr/data/local/tmp --> dir: /usr/ tail: tmp
+ * abc.d --> dir: [empty string] tail: abc.d
+- * (4 Consider the first example above: /usr/tmp/abc.d.
++ * (4 Consider the first example above: /usr/data/local/tmp/abc.d.
+ * Suppose you want the stem of the file, abc, without either
+ * the directory or the extension. This can be extracted in two steps:
+- * splitPathAtDirectory("usr/tmp/abc.d", NULL, &tail);
++ * splitPathAtDirectory("usr/data/local/tmp/abc.d", NULL, &tail);
+ * [sets tail: "abc.d"]
+ * splitPathAtExtension(tail, &basename, NULL);
+ * [sets basename: "abc"]
+@@ -2781,9 +2781,9 @@
+ * for the extension ptr.
+ * (3) This function makes decisions based only on the lexical
+ * structure of the input. Examples:
+- * /usr/tmp/abc.jpg --> basename: /usr/tmp/abc ext: .jpg
+- * /usr/tmp/.jpg --> basename: /usr/tmp/ ext: .jpg
+- * /usr/tmp.jpg/ --> basename: /usr/tmp.jpg/ ext: [empty str]
++ * /usr/data/local/tmp/abc.jpg --> basename: /usr/data/local/tmp/abc ext: .jpg
++ * /usr/data/local/tmp/.jpg --> basename: /usr/data/local/tmp/ ext: .jpg
++ * /usr/data/local/tmp.jpg/ --> basename: /usr/data/local/tmp.jpg/ ext: [empty str]
+ * ./.jpg --> basename: ./ ext: .jpg
+ * (4) The input can have either forward (unix) or backward (win)
+ * slash separators. The output has unix separators.
+@@ -2852,11 +2852,11 @@
+ * (6) The result is not canonicalized or tested for correctness:
+ * garbage in (e.g., /&%), garbage out.
+ * (7) Examples:
+- * //tmp// + //abc/ --> /tmp/abc
++ * //data/local/tmp// + //abc/ --> /data/local/tmp/abc
+ * tmp/ + /abc/ --> tmp/abc
+ * tmp/ + abc/ --> tmp/abc
+- * /tmp/ + /// --> /tmp
+- * /tmp/ + NULL --> /tmp
++ * /data/local/tmp/ + /// --> /data/local/tmp
++ * /data/local/tmp/ + NULL --> /data/local/tmp
+ * // + /abc// --> /abc
+ * // + NULL --> /
+ * NULL + /abc/def/ --> /abc/def
+@@ -2866,7 +2866,7 @@
+ * "" + "" --> (empty string)
+ * "" + / --> /
+ * ".." + /etc/foo --> NULL
+- * /tmp + ".." --> NULL
++ * /data/local/tmp + ".." --> NULL
+ *
+ */
+ char *
+@@ -3046,11 +3046,11 @@
+ * %fname == NULL.
+ * * from the name of a file in the local directory placed in
+ * %fname, with %dir == NULL.
+- * * if in a "/tmp" directory and on Windows, the Windows
++ * * if in a "/data/local/tmp" directory and on Windows, the Windows
+ * temp directory is used.
+- * (2) On Windows, if the root of %dir is '/tmp', this does a name
++ * (2) On Windows, if the root of %dir is '/data/local/tmp', this does a name
+ * translation:
+- * "/tmp" ==> [Temp] (Windows)
++ * "/data/local/tmp" ==> [Temp] (Windows)
+ * where [Temp] is the Windows temp directory.
+ * (3) On unix, the TMPDIR variable is ignored. No rewriting
+ * of temp directories is permitted.
+@@ -3106,13 +3106,13 @@
+
+ /* First handle %dir (which may be a full pathname).
+ * There is no path rewriting on unix, and on win32, we do not
+- * rewrite unless the specified directory is /tmp or
+- * a subdirectory of /tmp */
++ * rewrite unless the specified directory is /data/local/tmp or
++ * a subdirectory of /data/local/tmp */
+ if (!is_win32 || dirlen < 4 ||
+- (dirlen == 4 && strncmp(cdir, "/tmp", 4) != 0) || /* not in "/tmp" */
+- (dirlen > 4 && strncmp(cdir, "/tmp/", 5) != 0)) { /* not in "/tmp/" */
++ (dirlen == 4 && strncmp(cdir, "/data/local/tmp", 4) != 0) || /* not in "/data/local/tmp" */
++ (dirlen > 4 && strncmp(cdir, "/data/local/tmp/", 5) != 0)) { /* not in "/data/local/tmp/" */
+ stringCopy(pathout, cdir, dirlen);
+- } else { /* Rewrite for win32 with "/tmp" specified for the directory. */
++ } else { /* Rewrite for win32 with "/data/local/tmp" specified for the directory. */
+ #ifdef _WIN32
+ l_int32 tmpdirlen;
+ char tmpdir[MAX_PATH];
+@@ -3156,7 +3156,7 @@
+ * written into %result with unix separators.
+ * (2) Caller allocates %result, large enough to hold the path,
+ * which is:
+- * /tmp/%subdir (unix)
++ * /data/local/tmp/%subdir (unix)
+ * [Temp]/%subdir (Windows, macOS, iOS)
+ * where [Temp] is a path determined
+ * - on Windows: by GetTempPath()
+@@ -3199,7 +3199,7 @@
+ dir = pathJoin(result, subdir);
+ }
+ #else
+- dir = pathJoin("/tmp", subdir);
++ dir = pathJoin("/data/local/tmp", subdir);
+ #endif /* ~ __APPLE__ */
+
+ #ifndef _WIN32
+@@ -3267,7 +3267,7 @@
+ *
+ * Notes:
+ * (1) On unix, this makes a filename of the form
+- * "/tmp/lept.XXXXXX",
++ * "/data/local/tmp/lept.XXXXXX",
+ * where each X is a random character.
+ * (2) On Windows, this makes a filename of the form
+ * "/[Temp]/lp.XXXXXX".
+diff -Nura leptonica-1.83.1/src/writefile.c leptonica-1.83.1-patch/src/writefile.c
+--- leptonica-1.83.1/src/writefile.c 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/src/writefile.c 2024-09-05 14:26:11.099616574 +0800
+@@ -840,7 +840,7 @@
+ * with xv, because xv automatically downscales large images
+ * by subsampling, which looks poor. For 1 bpp, we use
+ * scale-to-gray to get decent-looking anti-aliased images.
+- * In all cases, we write a temporary file to /tmp/lept/disp,
++ * In all cases, we write a temporary file to /data/local/tmp/lept/disp,
+ * that is read by the display program.
+ * (5) The temporary file is written as png if, after initial
+ * processing for special cases, any of these obtain:
+@@ -974,10 +974,10 @@
+ index++;
+ if (pixGetDepth(pix2) < 8 || pixGetColormap(pix2) ||
+ (w < MaxSizeForPng && h < MaxSizeForPng)) {
+- snprintf(buffer, Bufsize, "/tmp/lept/disp/write.%03d.png", index);
++ snprintf(buffer, Bufsize, "/data/local/tmp/lept/disp/write.%03d.png", index);
+ pixWrite(buffer, pix2, IFF_PNG);
+ } else {
+- snprintf(buffer, Bufsize, "/tmp/lept/disp/write.%03d.jpg", index);
++ snprintf(buffer, Bufsize, "/data/local/tmp/lept/disp/write.%03d.jpg", index);
+ pixWrite(buffer, pix2, IFF_JFIF_JPEG);
+ }
+ tempname = genPathname(buffer, NULL);
+diff -Nura leptonica-1.83.1/version-notes.html leptonica-1.83.1-patch/version-notes.html
+--- leptonica-1.83.1/version-notes.html 2023-01-26 14:12:24.000000000 +0800
++++ leptonica-1.83.1-patch/version-notes.html 2024-09-05 14:26:11.103616495 +0800
+@@ -271,7 +271,7 @@
+ rootnames containing any of: ;&|>"?*$()/<
+ * CVE-2017-18196: duplicated path components.
+ This was fixed in 1.75.3.
+- * CVE-2018-7441: hardcoded /tmp pathnames.
++ * CVE-2018-7441: hardcoded /data/local/tmp pathnames.
+ These are all wrapped in special debug functions that are not
+ enabled by default in the distribution, starting with 1.76.0.
+ * CVE-2018-7247: input 'rootname' can overflow a buffer.
+@@ -480,12 +480,12 @@
+ All lept_* functions have been rewritten to avoid path rewrites for
+ output to temp files, which were introduced in 1.72.
+ Now, (1) files are written to the directory specified and (2) we
+- are careful to write to subdirectories of /tmp/lept/ for all test
++ are careful to write to subdirectories of /data/local/tmp/lept/ for all test
+ programs, starting with the reg tests and prog/dewarp* and
+ prog/recog*. This also required re-writing stringcode.c and
+ stringtemplate1.txt to write temp files to subdirectories.
+ Goal is to write to the specified path while not spamming the
+- /tmp and /tmp/lept directories. This is particularly important
++ /data/local/tmp and /data/local/tmp/lept directories. This is particularly important
+ on windows because files in the directory are not cleared
+ on reboot.
+ Naming changes (to avoid collisions):
+@@ -558,9 +558,9 @@
+ l_binaryReadStream() can now be used to capture data piped
+ in via stdin.
+ Font directory now arg passed in everywhere (not hardcoded)
+- Don't write temporary files to /tmp; only to a small number of
+- subdirectories, to avoid spamming the /tmp directory. E.g.,
+- for regression tests, the current output is now to /tmp/regout/.
++ Don't write temporary files to /data/local/tmp; only to a small number of
++ subdirectories, to avoid spamming the /data/local/tmp directory. E.g.,
++ for regression tests, the current output is now to /data/local/tmp/regout/.
+ For jpeg reading modify pixReadJpeg() to take as a hint
+ a bit flag that allows extraction of only the luminance channel.
+ Allow wrapping of pdf objects from png images without transcoding
diff --git a/thirdparty/leveldb/HPKBUILD b/thirdparty/leveldb/HPKBUILD
index e49f72006df05cc1b2fbd593048e8add865e874b..7e612f40b9e8b8a44d15528e70de05c75f30b69d 100644
--- a/thirdparty/leveldb/HPKBUILD
+++ b/thirdparty/leveldb/HPKBUILD
@@ -6,7 +6,7 @@ pkgrel=0
pkgdesc="LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values."
url="https://github.com/google/leveldb"
archs=("armeabi-v7a" "arm64-v8a")
-license=("BSD 3-Clause New or Revised License")
+license=("BSD-3-Clause")
depends=("snappy")
makedepends=()
source="https://github.com/google/$pkgname/archive/refs/tags/$pkgver.tar.gz"
diff --git a/thirdparty/leveldb/README.OpenSource b/thirdparty/leveldb/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..c86181d25f2341a2a6590598ded8f35d680944fe
--- /dev/null
+++ b/thirdparty/leveldb/README.OpenSource
@@ -0,0 +1,20 @@
+[
+ {
+ "Name": "leveldb",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/google/leveldb/blob/main/LICENSE",
+ "Version Number": "1.23",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/google/leveldb/archive/refs/tags/1.23.tar.gz",
+ "Description": "LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values."
+ },
+ {
+ "Name": "snappy",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/google/snappy/blob/main/COPYING",
+ "Version Number": "1.1.10",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/google/snappy/archive/refs/tags/1.1.10.tar.gz",
+ "Description": "Snappy is a compression/decompression library. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. For instance, compared to the fastest mode of zlib, Snappy is an order of magnitude faster for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger"
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/libarchive/HPKBUILD b/thirdparty/libarchive/HPKBUILD
index 4fb1b9a3db0ca47b1dd01047a867a1f95102e237..610df5b3b04b4413df93f7e398a93f50e09600c5 100644
--- a/thirdparty/libarchive/HPKBUILD
+++ b/thirdparty/libarchive/HPKBUILD
@@ -33,7 +33,16 @@ buildtools="cmake"
builddir=${pkgname}-$pkgver
packagename=$builddir.zip
+patchflag=true
prepare() {
+ if $patchflag
+ then
+ cd $builddir
+ # 该patch 修改测试文件中的/tmp 目录,替换为/data/local/tmp
+ patch -p1 < ../libarchive_ohos_test.patch
+ patchflag=false
+ cd $OLDPWD
+ fi
mkdir -p $builddir/$ARCH-build
}
diff --git a/thirdparty/libarchive/README.OpenSource b/thirdparty/libarchive/README.OpenSource
index 6dd9162b35425e231b2db8876c3447d116ba4c0e..9cf95facfd6ddc09f9255c172ef24ef2590d556d 100644
--- a/thirdparty/libarchive/README.OpenSource
+++ b/thirdparty/libarchive/README.OpenSource
@@ -4,8 +4,27 @@
"License": "GNU Library General Public License",
"License File": "https://github.com/libarchive/libarchive/blob/master/COPYING",
"Version Number": "v3.6.2",
- "Owner": "1596268623@qq.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/libarchive/libarchive/archive/refs/tags/v3.6.2.tar.gz",
"Description": "The libarchive project develops a portable, efficient C library that can read and write streaming archives in a variety of formats."
+ },
+ {
+ "Name": "xz",
+ "License": "Public Domain and LGPL-2.1 and GPL-2.0 and GPL-3.0",
+ "License File": ["https://github.com/tukaani-project/xz/blob/v5.4/COPYING","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv2",
+ "https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv3","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.LGPLv2.1"],
+ "Version Number": "5.4.1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/tukaani-project/xz/releases/download/v5.4.1/xz-5.4.1.tar.gz",
+ "Description": "XZ Utils is free general-purpose data compression software with a high compression ratio. "
+ },
+ {
+ "Name": "zstd",
+ "License": "BSD-3-Clause or GPL-2.0",
+ "License File": ["https://github.com/facebook/zstd/blob/dev/LICENSE","https://github.com/facebook/zstd/blob/dev/COPYING"],
+ "Version Number": "v1.5.4",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz",
+ "Description": "Zstandard, or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios."
}
]
diff --git a/thirdparty/libarchive/README_zh.md b/thirdparty/libarchive/README_zh.md
index 880141de947b04fc2a21026baa9b4a601b4bfc5a..92cd51dde0587f72edc82e32b68801d8a166346b 100644
--- a/thirdparty/libarchive/README_zh.md
+++ b/thirdparty/libarchive/README_zh.md
@@ -1,11 +1,12 @@
# libarchive 三方库说明
## 功能简介
libarchive项目开发了一种便携式,高效的C库,可以以各种格式读取和编写流库。它还包括使用libarchive库的常见功能包括,tar,cpio 和 zcat 命令行工具的实现。
+
+## 三方库版本
+- v3.6.2
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v3.6.2
-- libarchive项目开发了一种便携式,高效的C库,可以以各种格式读取和编写流库
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libarchive/docs/hap_integrate.md b/thirdparty/libarchive/docs/hap_integrate.md
index 5b6512ae1e05c96395c1e7f5b3a19755b4bdf98c..e026386cd1d22385b83083c7fed1a84d924115b4 100644
--- a/thirdparty/libarchive/docs/hap_integrate.md
+++ b/thirdparty/libarchive/docs/hap_integrate.md
@@ -2,13 +2,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libarchive/libarchive_ohos_test.patch b/thirdparty/libarchive/libarchive_ohos_test.patch
new file mode 100644
index 0000000000000000000000000000000000000000..cbb275232bccf8d0a38d50d8a70ae0a7da5d361b
--- /dev/null
+++ b/thirdparty/libarchive/libarchive_ohos_test.patch
@@ -0,0 +1,87 @@
+diff -Nura libarchive-v3.6.2/libarchive/test/test_write_disk_secure.c libarchive-v3.6.2-patchdir/libarchive/test/test_write_disk_secure.c
+--- libarchive-v3.6.2/libarchive/test/test_write_disk_secure.c 2022-12-09 21:28:16.000000000 +0800
++++ libarchive-v3.6.2-patchdir/libarchive/test/test_write_disk_secure.c 2024-08-02 15:25:25.595723548 +0800
+@@ -90,24 +90,24 @@
+
+ /* Write an absolute symlink to /tmp. */
+ assert((ae = archive_entry_new()) != NULL);
+- archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_symlink");
++ archive_entry_copy_pathname(ae, "/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_symlink");
+ archive_entry_set_mode(ae, S_IFLNK | 0777);
+- archive_entry_set_symlink(ae, "/tmp");
++ archive_entry_set_symlink(ae, "/data/local/tmp");
+ archive_write_disk_set_options(a, 0);
+ assert(0 == archive_write_header(a, ae));
+ assert(0 == archive_write_finish_entry(a));
+
+ /* With security checks enabled, this should fail. */
+ assert(archive_entry_clear(ae) != NULL);
+- archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
++ archive_entry_copy_pathname(ae, "/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
+ archive_entry_set_mode(ae, S_IFREG | 0777);
+ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_SYMLINKS);
+ failure("Extracting a file through an absolute symlink should fail here.");
+ assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
+ archive_entry_free(ae);
+- assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
+- assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink"));
+- unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
++ assertFileNotExists("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_symlink/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
++ assert(0 == unlink("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_symlink"));
++ unlink("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_symlink_path.tmp");
+
+ /* Create another link. */
+ assert((ae = archive_entry_new()) != NULL);
+@@ -227,23 +227,23 @@
+ * extract an absolute path.
+ */
+ assert((ae = archive_entry_new()) != NULL);
+- archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++ archive_entry_copy_pathname(ae, "/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
+ archive_entry_set_mode(ae, S_IFREG | 0777);
+ assert(0 == archive_write_header(a, ae));
+ assert(0 == archive_write_finish_entry(a));
+- assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
+- assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"));
++ assertFileExists("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++ assert(0 == unlink("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"));
+
+ /* But with security checks enabled, this should fail. */
+ assert(archive_entry_clear(ae) != NULL);
+- archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++ archive_entry_copy_pathname(ae, "/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
+ archive_entry_set_mode(ae, S_IFREG | 0777);
+ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS);
+ failure("Extracting an absolute path should fail here.");
+ assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
+ archive_entry_free(ae);
+ assert(0 == archive_write_finish_entry(a));
+- assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
++ assertFileNotExists("/data/local/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
+
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+diff -Nura libarchive-v3.6.2/libarchive/test/test_write_open_memory.c libarchive-v3.6.2-patchdir/libarchive/test/test_write_open_memory.c
+--- libarchive-v3.6.2/libarchive/test/test_write_open_memory.c 2022-12-09 21:28:16.000000000 +0800
++++ libarchive-v3.6.2-patchdir/libarchive/test/test_write_open_memory.c 2024-08-02 15:22:34.550205585 +0800
+@@ -33,7 +33,7 @@
+ unsigned int i;
+ struct archive *a;
+ struct archive_entry *ae;
+- const char *name="/tmp/test";
++ const char *name="/data/local/tmp/test";
+
+ /* Create a simple archive_entry. */
+ assert((ae = archive_entry_new()) != NULL);
+diff -Nura libarchive-v3.6.2/test_utils/test_main.c libarchive-v3.6.2-patchdir/test_utils/test_main.c
+--- libarchive-v3.6.2/test_utils/test_main.c 2022-12-09 21:28:16.000000000 +0800
++++ libarchive-v3.6.2-patchdir/test_utils/test_main.c 2024-08-02 15:22:58.921789733 +0800
+@@ -3965,7 +3965,7 @@
+ else if (getenv("TEMPDIR") != NULL)
+ tmp = getenv("TEMPDIR");
+ else
+- tmp = "/tmp";
++ tmp = "/data/local/tmp";
+
+ /* Allow -d to be controlled through the environment. */
+ if (getenv(ENVBASE "_DEBUG") != NULL)
diff --git a/thirdparty/libass/README_zh.md b/thirdparty/libass/README_zh.md
index dadaeca68de337090dac9682bb86b26594e4d80b..7f5ad0695a7d8ad3d14889726561013c7d223483 100644
--- a/thirdparty/libass/README_zh.md
+++ b/thirdparty/libass/README_zh.md
@@ -1,11 +1,15 @@
# libass三方库说明
## 功能简介
libass库则是一个轻量级的对ASS/SSA格式字幕进行渲染的开源库。
+
+## 三方库版本
+- 0.17.1
+
+## 已适配功能
+- 支持ASS/SSA格式字幕进行渲染
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:0.17.1
-- 当前适配的功能:支持ASS/SSA格式字幕进行渲染
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libass/docs/hap_integrate.md b/thirdparty/libass/docs/hap_integrate.md
index a2da972cc706fbe49b3ea44fbe833ea6487d758f..e3bf679bf22a3c956ebfe35f26e47c40ef5c68f7 100644
--- a/thirdparty/libass/docs/hap_integrate.md
+++ b/thirdparty/libass/docs/hap_integrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libavc/README_zh.md b/thirdparty/libavc/README_zh.md
index 60ba938e16b59ece1322f5c6ae7fe12b27512ebb..5702a0fe357cd175da04dadb81b58ef6a2e35f41 100644
--- a/thirdparty/libavc/README_zh.md
+++ b/thirdparty/libavc/README_zh.md
@@ -1,11 +1,15 @@
# libavc三方库说明
## 功能简介
libavc处理音频和视频
+
+## 三方库版本
+- v1.4.0
+
+## 已适配功能
+- 音视频处理
+
## 使用约束
-- IDE版本:DevEco Studio 4.1.3.600
-- SDK版本:sdk-linux-5.0.3.100 (API Version 12 Release)
-- 三方库版本:v1.4.0
-- 当前适配的功能:音视频处理
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libavc/docs/hap_integrate.md b/thirdparty/libavc/docs/hap_integrate.md
index a0ea0ab6b9e22a08b2142795958ef166163f15eb..45282f7b20898fec17f233840beb4f2d0d50b8ba 100644
--- a/thirdparty/libavc/docs/hap_integrate.md
+++ b/thirdparty/libavc/docs/hap_integrate.md
@@ -1,11 +1,7 @@
# libavc集成到应用hap
本库是在RK3568开发板上基于OpenHarmony的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu22.04
-- [ohos_sdk_public 5.0.0.13 (API Version 12 Release)](https://cidownload.openharmony.cn/version/Master_Version/OpenHarmony_5.0.0.13_dev/20240303_020132/version-Master_Version-OpenHarmony_5.0.0.13_dev-20240303_020132-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```shell
diff --git a/thirdparty/libavif/README.OpenSource b/thirdparty/libavif/README.OpenSource
index 0b542f02af5913f9202fb320894cb26410cad2b9..8723272a8092f3b71356a67c522f3d9ad3369c57 100644
--- a/thirdparty/libavif/README.OpenSource
+++ b/thirdparty/libavif/README.OpenSource
@@ -2,11 +2,56 @@
{
"Name": "libavif",
"License": "BSD-2-Clause",
- "License File": "LICENSE",
+ "License File": "https://github.com/AOMediaCodec/libavif/blob/main/LICENSE",
"Version Number": "1.0.1",
- "Owner": "huangminzhong2@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.0.1.tar.gz",
"Description": "This library aims to be a friendly, portable C implementation of the AV1 Image File Format"
+ },
+ {
+ "Name": "libyuv",
+ "License": "BSD 3-Clause",
+ "License File": "https://chromium.googlesource.com/libyuv/libyuv/+/c0031cfd95e131c7b11be41d0272455cc63f10f4/LICENSE",
+ "Version Number": "c0031cf",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://chromium.googlesource.com/libyuv/libyuv/+archive/c0031cfd95e131c7b11be41d0272455cc63f10f4.tar.gz",
+ "Description": "libyuv is an open-source image processing library that provides various image processing functions, including image format conversion, color space conversion, color adjustment, denoising, defogging, sharpening, and scaling."
+ },
+ {
+ "Name": "libpng",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
+ "Version Number": "1.6.39",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
+ },
+ {
+ "Name": "jpeg",
+ "License": "Independent JPEG Group License",
+ "License File": "https://www.ijg.org/files/README",
+ "Version Number": "v9e",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "http://www.ijg.org/files/jpegsrc.v9e.tar.gz",
+ "Description": "IJG is an informal group that writes and distributes a widely used free library for JPEG image compression"
+ },
+ {
+ "Name": "googletest",
+ "License": "BSD-3-Clause license",
+ "License File": "https://github.com/google/googletest/blob/main/LICENSE",
+ "Version Number": "v1.13.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
+ "Description": "Google Testing and Mocking Framework"
+ },
+ {
+ "Name": "libaom",
+ "License": "BSD 2-Clause",
+ "License File": "https://gitlab.com/webmproject/libaom/-/blob/master/LICENSE",
+ "Version Number": "v3.6.1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://gitlab.com/webmproject/libaom/-/archive/v3.6.1/libaom-v3.6.1.tar.gz",
+ "Description": "Used for processing AV1 video codec"
}
]
diff --git a/thirdparty/libavif/README_zh.md b/thirdparty/libavif/README_zh.md
index d727affa4485c14b6dd2e8d18fb61c3dbbfc9562..78967d82348240dca15e70d4ca6f16fad90a33c9 100644
--- a/thirdparty/libavif/README_zh.md
+++ b/thirdparty/libavif/README_zh.md
@@ -1,11 +1,15 @@
# libavif三方库说明
## 功能简介
libavif用于编码和解码avif格式图像文件
+
+## 三方库版本
+- 1.0.1
+
+## 已适配功能
+- 支持avif格式图像文件
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.0.1
-- 当前适配的功能:支持avif格式图像文件
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libcap/README_zh.md b/thirdparty/libcap/README_zh.md
index 567ca859684479549efcfaf5ca7317752eb3cc10..11eb92dbe0ab6a84500fca425089a86f76328e9f 100644
--- a/thirdparty/libcap/README_zh.md
+++ b/thirdparty/libcap/README_zh.md
@@ -1,11 +1,15 @@
# libcap三方库说明
## 功能简介
libcap的功能是用于管理进程的权限和权限限制。
+
+## 三方库版本
+- 2.69
+
+## 已适配功能
+- 由于权限问题只支持对本用户进程(当前进程)的操作,其他用户的进程均不能操作。本进程的操作接口cap_get_flag(部分数据)、cap_set_flag、cap_drop_bound接口由于权限问题无法支持。
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:2.69
-- 当前适配的功能:由于权限问题只支持对本用户进程(当前进程)的操作,其他用户的进程均不能操作。本进程的操作接口cap_get_flag(部分数据)、cap_set_flag、cap_drop_bound接口由于权限问题无法支持。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libcap/docs/hap_integrate.md b/thirdparty/libcap/docs/hap_integrate.md
index effc54960aa3d1169fa995f5a946fca6fae1d2f5..5fc79565af0c826ae3f2c93dc6de62bfd41070b6 100644
--- a/thirdparty/libcap/docs/hap_integrate.md
+++ b/thirdparty/libcap/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libcap集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libdash/HPKBUILD b/thirdparty/libdash/HPKBUILD
index d26197e03ddc61ac7c298b72e5f6be5d3594382d..b7993fdcdf80b1cb48b7b1597e254d0964b418b3 100644
--- a/thirdparty/libdash/HPKBUILD
+++ b/thirdparty/libdash/HPKBUILD
@@ -6,7 +6,7 @@ pkgrel=0
pkgdesc="libdash is the official reference software of the ISO/IEC MPEG-DASH standard and is an open-source library that provides an object orient (OO) interface to the MPEG-DASH standard, developed by Bitmovin."
url="https://github.com/bitmovin/libdash"
archs=("armeabi-v7a" "arm64-v8a")
-license=("LGPLv2.1")
+license=("LGPL-2.1-or-later")
depends=("libxml2" "curl")
makedepends=()
install=
diff --git a/thirdparty/libdash/README.OpenSource b/thirdparty/libdash/README.OpenSource
index a5ed8a1648a949608fb1f40c8d4d694c121afda6..2ddb663338dedd356b9b74dd517c5431885307ec 100644
--- a/thirdparty/libdash/README.OpenSource
+++ b/thirdparty/libdash/README.OpenSource
@@ -1,11 +1,29 @@
[
{
"Name": "libdash",
- "License": "LGPLv2.1",
+ "License": "LGPL-2.1-or-later",
"License File": "README.md",
"Version Number": "v2.2",
- "Owner": "wupingyuan@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/bitmovin/libdash/archive/refs/tags/v2.2.tar.gz",
"Description": "libdash is the official reference software of the ISO/IEC MPEG-DASH standard and is an open-source library that provides an object orient (OO) interface to the MPEG-DASH standard, developed by Bitmovin."
+ },
+ {
+ "Name": "libxml2",
+ "License": " MIT license",
+ "License File": "https://github.com/GNOME/libxml2/blob/master/Copyright",
+ "Version Number": "v2.11.3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.3.tar.gz",
+ "Description": "libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project."
+ },
+ {
+ "Name": "curl",
+ "License": "curl",
+ "License File": "https://github.com/curl/curl/blob/master/COPYING",
+ "Version Number": "curl-8_0_1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/curl/curl/archive/refs/tags/curl-8_0_1.tar.gz",
+ "Description": "Curl is a command-line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document."
}
]
diff --git a/thirdparty/libdash/README_zh.md b/thirdparty/libdash/README_zh.md
index 0929572eb65ecb1e77db6eae952cf9a4ade2524a..c36670acc389e0d51382ee344fd7dd5912870429 100644
--- a/thirdparty/libdash/README_zh.md
+++ b/thirdparty/libdash/README_zh.md
@@ -1,11 +1,15 @@
# libdash三方库说明
## 功能简介
libdash是ISO/IEC MPEG-DASH标准的官方参考软件,为Bitmovin开发的MPEG-DASH提供面向对象(OO)接口。
+
+## 三方库版本
+- v2.2
+
+## 已适配功能
+- 支持MPEG-DASH编码
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.2
-- 当前适配的功能:支持MPEG-DASH编码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libdash/docs/hap_integrate.md b/thirdparty/libdash/docs/hap_integrate.md
index 453f081f8fd5a41dc181ff6b5320912e1edce908..02bd59fa522ad02ba77d94b628a5fcfd10dd3935 100644
--- a/thirdparty/libdash/docs/hap_integrate.md
+++ b/thirdparty/libdash/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libdash集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libde265/README_zh.md b/thirdparty/libde265/README_zh.md
index a021cb4ac6ab409181096c2f0fcbc8bd85f86616..c4238e68976e8cec49082693a01b62bdd97032fe 100644
--- a/thirdparty/libde265/README_zh.md
+++ b/thirdparty/libde265/README_zh.md
@@ -1,11 +1,15 @@
# libde265三方库说明
## 功能简介
libde265用于h265格式视频编解码
+
+## 三方库版本
+- v1.0.15
+
+## 已适配功能
+- 支持h265格式的视频解码,暂不支持编码
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v1.0.15
-- 当前适配的功能:支持h265格式的视频解码,暂不支持编码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libdeflate/HPKBUILD b/thirdparty/libdeflate/HPKBUILD
index 06d9faefc1eb516a8032b8d4754989bebd7fb2b4..08b4784ff3b4a1ae4b59c16ead669edce3e65653 100644
--- a/thirdparty/libdeflate/HPKBUILD
+++ b/thirdparty/libdeflate/HPKBUILD
@@ -17,8 +17,8 @@
pkgname=libdeflate
pkgver=v1.17
pkgrel=0
-pkgdesc=""
-url=""
+pkgdesc="libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression."
+url="https://github.com/ebiggers/libdeflate"
archs=("armeabi-v7a" "arm64-v8a")
license=("MIT")
depends=()
diff --git a/thirdparty/libdeflate/README.OpenSource b/thirdparty/libdeflate/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..8673c4424ed8d12e00dc2994e43a9feabda9493c
--- /dev/null
+++ b/thirdparty/libdeflate/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libdeflate",
+ "License": "MIT",
+ "License File": "https://github.com/ebiggers/libdeflate/blob/master/COPYING",
+ "Version Number": "v1.17",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.17.tar.gz",
+ "Description": "libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression."
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/libevent/README.OpenSource b/thirdparty/libevent/README.OpenSource
index 15c1406514c50890ca18728bfcd56b2f38025029..a95e8ccd745ac133619b05197c405fbf6e296305 100644
--- a/thirdparty/libevent/README.OpenSource
+++ b/thirdparty/libevent/README.OpenSource
@@ -1,11 +1,20 @@
[
{
"Name": "libevent",
- "License": "BSD-style license",
- "License File": "LICENSE",
+ "License": "BSD-3-Clause",
+ "License File": "https://libevent.org/LICENSE.txt",
"Version Number": "release-2.1.12-stable",
- "Owner": "huangminzhong2@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/libevent/libevent/releases/tag/release-2.1.12-stable",
"Description": "Libevent supports /dev/poll, kqueue(2), event ports, POSIX select(2), Windows select(), poll(2), and epoll(4). Libevent additionally provides a sophisticated framework for buffered network IO, with support for sockets, filters, rate-limiting, SSL, zero-copy file transmission, and IOCP. Libevent includes support for several useful protocols, including DNS, HTTP, and a minimal RPC framework."
+ },
+ {
+ "Name": "openssl",
+ "License": "OpenSSL License and Original SSLeay License",
+ "License File": "https://www.openssl.org/source/license-openssl-ssleay.txt",
+ "Version Number": "1.1.1u",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://gitee.com/mirrors/openssl/repository/archive/OpenSSL_1_1_1u.zip",
+ "Description": "OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol."
}
]
diff --git a/thirdparty/libevent/README_zh.md b/thirdparty/libevent/README_zh.md
index e7a0a75be66775039270e4ce571e0f0e90b8423f..57ee8d61a101093f39fce1207e559560458e6c2f 100644
--- a/thirdparty/libevent/README_zh.md
+++ b/thirdparty/libevent/README_zh.md
@@ -3,11 +3,14 @@
Libevent支持devpoll、kqueue(2个)、事件端口、POSIX select(2个)、Windows select(2个)、poll(2个)和epoll(4个)。Libevent还为缓冲网络IO提供了一个完善的框架,支持套接字、过滤器、速率限制、SSL、零拷贝文件传输和IOCP。
- ## 使用约束
-- IDE版本:DevEco Studio 4.1.3.313
-- SDK版本:ohos_sdk_public 4.1.0.36 (API Version 11 Release)
-- 三方库版本:release-2.1.12-stable
-- 当前适配的功能:支持devpoll、kqueue(2个)、事件端口、POSIX select(2个)、Windows select(2个)、poll(2个)、epoll(4个)、套接字、过滤器、速率限制、SSL、零拷贝文件传输和IOCP
+## 三方库版本
+- release-2.1.12-stable
+
+## 已适配功能
+- 支持devpoll、kqueue(2个)、事件端口、POSIX select(2个)、Windows select(2个)、poll(2个)、epoll(4个)、套接字、过滤器、速率限制、SSL、零拷贝文件传输和IOCP
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
[应用包hap集成](docs/hap_integrate.md)
diff --git a/thirdparty/libexif/HPKBUILD b/thirdparty/libexif/HPKBUILD
index 83fb97ec5a19af86cf4e4a5ad97c74642140c9a3..68d246443dd3cd3689798d1d1a06df85c97ee058 100644
--- a/thirdparty/libexif/HPKBUILD
+++ b/thirdparty/libexif/HPKBUILD
@@ -20,7 +20,7 @@ pkgrel=0
pkgdesc="A library for parsing, editing, and saving EXIF data"
url="https://libexif.github.io/"
archs=("armeabi-v7a" "arm64-v8a")
-license=("LGPLv2.1")
+license=("LGPL-2.1-only")
depends=()
makedepends=()
source="https://github.com/libexif/$pkgname/releases/download/$pkgver/$pkgname-${pkgver:1}.tar.bz2"
diff --git a/thirdparty/libexif/README.OpenSource b/thirdparty/libexif/README.OpenSource
index 38ecc98d95046dc77436e314755d960f7aaf016a..6ad50116ad3e8f163e5e663cf8132201dbdade2c 100644
--- a/thirdparty/libexif/README.OpenSource
+++ b/thirdparty/libexif/README.OpenSource
@@ -1,10 +1,10 @@
[
{
"Name": "libexif",
- "License": "LGPLv2.1",
+ "License": "LGPL-2.1-only",
"License File": "https://github.com/libexif/libexif/blob/master/COPYING",
"Version Number": "0.6.24",
- "Owner": "1393302983@qq.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/libexif/libexif/releases/download/v0.6.24/libexif-0.6.24.tar.bz2",
"Description": "libexif is a library for parsing, editing, and saving EXIF data."
}
diff --git a/thirdparty/libexif/README_zh.md b/thirdparty/libexif/README_zh.md
index b0466628e6c3d97b9a295e7dff98b842be71fccd..ce6e074818471c4b56c2f09e510781562ca9ab08 100644
--- a/thirdparty/libexif/README_zh.md
+++ b/thirdparty/libexif/README_zh.md
@@ -1,11 +1,15 @@
# libexif三方库说明
## 功能简介
libexif是一个用于解析、编辑和保存EXIF数据的库
+
+## 三方库版本
+- 0.6.24
+
+## 已适配功能
+- 从照片中读取相机快门速度,光圈,GPS定位和相机主人的姓名等照片信息,并且能解析和保存EXIF数据
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:0.6.24
-- 当前适配的功能:从照片中读取相机快门速度,光圈,GPS定位和相机主人的姓名等照片信息,并且能解析和保存EXIF数据
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/libexpat/README.OpenSource b/thirdparty/libexpat/README.OpenSource
index 657734debb2494efb2c1836bf29578e3d691584c..ed77f3a72a046f7d0000a14c9e907b8a0030d351 100644
--- a/thirdparty/libexpat/README.OpenSource
+++ b/thirdparty/libexpat/README.OpenSource
@@ -2,9 +2,9 @@
{
"Name": "libexpat",
"License": "MIT",
- "License File": "COPYING",
+ "License File": "https://github.com/libexpat/libexpat/blob/master/COPYING",
"Version Number": "R_2_5_0",
- "Owner": "wupingyuan@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/libexpat/libexpat/archive/refs/tags/R_2_5_0.tar.gz",
"Description": "Fast streaming XML parser written in C99."
}
diff --git a/thirdparty/libexpat/README_zh.md b/thirdparty/libexpat/README_zh.md
index c244c06ddbe882c9883261d43e344cc84aa2c017..6788b77b9ddd0e7e727b918c216707f020f5cc4c 100644
--- a/thirdparty/libexpat/README_zh.md
+++ b/thirdparty/libexpat/README_zh.md
@@ -1,11 +1,15 @@
# libexpat三方库说明
## 功能简介
libexpat是一个用于解析XML 1.0的C99库,面向流的XML解析器。
+
+## 三方库版本
+- R_2_5_0
+
+## 已适配功能
+- 解析XML
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:R_2_5_0
-- 当前适配的功能:解析XML
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libexpat/docs/hap_integrate.md b/thirdparty/libexpat/docs/hap_integrate.md
index 909466180d786ac23f250f61ed3baa6747f58763..6874c9fb00675319db2f659ed9b89a3ca14e774e 100644
--- a/thirdparty/libexpat/docs/hap_integrate.md
+++ b/thirdparty/libexpat/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libexpat集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libextractor/HPKBUILD b/thirdparty/libextractor/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..934160f846c87323939554fa24794861613649fa
--- /dev/null
+++ b/thirdparty/libextractor/HPKBUILD
@@ -0,0 +1,107 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , Sunjiamei<939650669@qq.com>
+# Maintainer: Jeff Han
+
+pkgname=libextractor
+pkgver=1.11
+pkgrel=0
+pkgdesc="libextractor is a library used to extract meta data from files of arbitrary type."
+url=https://www.gnu.org/software/libextractor/
+archs=("armeabi-v7a" "arm64-v8a")
+license=(GPL-3.0-only)
+depends=("libtool" "gettext" "zlib_1_3_1" "bzip2_1_0_8")
+makedepends=()
+
+source=https://git.gnunet.org/${pkgname}.git/snapshot/${pkgname}-${pkgver}.zip
+
+autounpack=true
+downloadpackage=true
+buildtools="configure"
+
+builddir=$pkgname-${pkgver}
+packagename=$builddir.zip
+
+source envset.sh
+host=
+prepare() {
+ cp -rf $builddir $builddir-$ARCH-build
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ setarm32ENV
+ host=arm-linux
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ setarm64ENV
+ host=aarch64-linux
+ else
+ echo "$ARCH not support!"
+ return -1
+ fi
+ export CFLAGS="-I$LYCIUM_ROOT/usr/libtool/$ARCH/include -L$LYCIUM_ROOT/usr/libtool/$ARCH/lib"
+ cd $builddir-$ARCH-build
+ ./bootstrap > $buildlog 2>&1
+ cd $OLDPWD
+}
+
+build() {
+ cd $builddir-$ARCH-build
+ ./configure "$@" --host=$host --disable-testruns >> $buildlog 2>&1
+ $MAKE VERBOSE=1 >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir-$ARCH-build
+ $MAKE install VERBOSE=1 >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ cd $builddir-$ARCH-build
+ #only build tests when --disable-testruns
+ $MAKE check >> $buildlog 2>&1
+ cd $OLDPWD
+ #then edit makefile from src/main and src/plugins
+ cd $builddir-$ARCH-build
+ sed -i.bak '/^all: all-recursive$/,/^\t@:$/s/^/#/' src/main/Makefile
+ sed -i.bak '/^all: all-recursive$/,/^\t@:$/s/^/#/' src/plugins/Makefile
+ sed -i.bak 's/^#TESTS = $(check_PROGRAMS)$/TESTS = $(check_PROGRAMS)/' src/main/Makefile
+ sed -i.bak 's/^#TESTS = \\$/TESTS = \\/' src/plugins/Makefile
+ sed -i.bak 's/^# $(fuzz_tests) \\$/ $(fuzz_tests) \\/' src/plugins/Makefile
+ sed -i.bak 's/^# $(check_PROGRAMS)$/ $(check_PROGRAMS)/' src/plugins/Makefile
+ cd $OLDPWD
+ #modify the path to sed in the test script
+ cd $builddir-$ARCH-build/src/main
+ for file in test_file test_gzip test_ipc test_plugin_load_multi test_plugin_loading test_trivial; do
+ sed -i.bak 's|/usr/bin/sed|/bin/sed|g' "$file"
+ done
+ cd $OLDPWD
+ cd $builddir-$ARCH-build/src/plugins
+ for file in test_deb test_dvi test_it test_man test_nsf test_nsfe test_odf test_png test_ps test_riff test_s3m test_sid test_wav test_xm test_zip ; do
+ sed -i.bak 's|/usr/bin/sed|/bin/sed|g' "$file"
+ done
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build
+}
diff --git a/thirdparty/libextractor/HPKCHECK b/thirdparty/libextractor/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..3ca60ea8b3f8430a4af06b67aef2b6d0c3d5c992
--- /dev/null
+++ b/thirdparty/libextractor/HPKCHECK
@@ -0,0 +1,43 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , Sunjiamei<939650669@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ res=0
+ cd $builddir-$ARCH-build/src/main
+ make check-TESTS > ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ]; then
+ echo "test main failed" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+ fi
+ echo "test main pass" >> ${logfile} 2>&1
+ cd $OLDPWD
+ cd $builddir-$ARCH-build/src/plugins
+ make check-TESTS >> ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ]; then
+ echo "test plugins failed" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+ fi
+ echo "test plugins pass" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/libextractor/OAT.xml b/thirdparty/libextractor/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/libextractor/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libextractor/README.OpenSource b/thirdparty/libextractor/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..93d6ebba73e26812d01c51efa229f44c26d8a0cb
--- /dev/null
+++ b/thirdparty/libextractor/README.OpenSource
@@ -0,0 +1,47 @@
+[
+ {
+ "Name": "libextractor",
+ "License": "GPL-3.0-only",
+ "License File": "https://git.gnunet.org/libextractor.git/tree/COPYING",
+ "Version Number": "v1.11",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://www.gnu.org/software/libextractor/",
+ "Description": "libextractor is a library used to extract meta data from files of arbitrary type."
+ },
+ {
+ "Name": "libtool",
+ "License": "GPL-2.0",
+ "License File": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
+ "Version Number": "2.4.6",
+ "Owner": "wupingyuan@huawei.com",
+ "Upstream URL": "https://www.gnu.org",
+ "Description": "GNU Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface."
+ },
+ {
+ "Name": "gettext",
+ "License": "GPL-3.0",
+ "License File": "https://www.gnu.org/licenses/gpl-3.0.html",
+ "Version Number": "0.22",
+ "Owner": "myxuan475@126.com",
+ "Upstream URL": "https://www.gnu.org/software/gettext",
+ "Description": "gettext is an important step for the GNU Translation Project, as it is an asset on which we may build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools and documentation."
+ },
+ {
+ "Name": "zlib_1_3_1",
+ "License": "Zlib",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.3.1",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib",
+ "Description": "zlib 1.3.1 is a general purpose data compression library.All the code is thread safe."
+ },
+ {
+ "Name": "bzip2_1_0_8",
+ "License": "bzip2-1.0.6",
+ "License File": "https://sourceforge.net/p/bzip2/bzip2/ci/bzip2-1_0_6/tree/LICENSE",
+ "Version Number": "1.0.8",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://sourceware.org/git/bzip2",
+ "Description": "bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression."
+ }
+]
diff --git a/thirdparty/libextractor/README_zh.md b/thirdparty/libextractor/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..659bd5ea699d07cff12560d0238ea8fa910e1916
--- /dev/null
+++ b/thirdparty/libextractor/README_zh.md
@@ -0,0 +1,12 @@
+# libextractor 三方库说明
+## 功能简介
+libextractor是一个用于从文件中提取元数据的库。
+
+## 三方库版本
+- v1.11
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libextractor/SHA512SUM b/thirdparty/libextractor/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..1d7f10bc4083abceb77d9a5028850d1807c884ef
--- /dev/null
+++ b/thirdparty/libextractor/SHA512SUM
@@ -0,0 +1 @@
+baada6bab9387af40bd7296408daa4a1dc201c87aa8e8a4ec5ae8ee8d6aee5c7cbfb82592e99c3075471eff0e1dc804de4abb91a1aa4bf1a79beeec5cd8cb1ce libextractor-1.11.zip
diff --git a/thirdparty/libextractor/docs/hap_integrate.md b/thirdparty/libextractor/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..c9e0717bdceed6bee4cc7814fca3652062c3f6e5
--- /dev/null
+++ b/thirdparty/libextractor/docs/hap_integrate.md
@@ -0,0 +1,95 @@
+# libextractor集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libextractor #三方库libextractor的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libextractor
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libextractor/arm64-v8a libextractor/armeabi-v7a
+ libtool/arm64-v8a libtool/armeabi-v7a
+ gettext/arm64-v8a gettext/armeabi-v7a
+ zlib/arm64-v8a zlib/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将三方库及其依赖库编译生成的头文件拷贝到该目录下。如下图所示:
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库的头文件和库文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libextractor/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libextractor/${OHOS_ARCH}/lib/libextractor.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libextractor/${OHOS_ARCH}/lib/libextractor_common.a)
+ #将三方库依赖库的头文件和库文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/lib/libasprintf.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/lib/libgettextlib.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/lib/libgettextpo.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/lib/libintl.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gettext/${OHOS_ARCH}/lib/libtextstyle.a)
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtool/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtool/${OHOS_ARCH}/lib/libltdl.a)
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.a)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+```
+ /data/tpc_c_cplusplus/thirdparty/libextractor/libextractor-1.6-arm64-v8a-build/src/main
+ make check-TEST
+```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [libtomcrypt三方库地址](https://github.com/ndurner/libextractor)
+
diff --git a/thirdparty/libextractor/docs/pic/libextractor-dev.png b/thirdparty/libextractor/docs/pic/libextractor-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..a297e54fd018eebcda240022528933e445d1ccce
Binary files /dev/null and b/thirdparty/libextractor/docs/pic/libextractor-dev.png differ
diff --git a/thirdparty/libffi/HPKBUILD b/thirdparty/libffi/HPKBUILD
index 89ae32d67f86a53287a989925c8160c7e729cb61..647cdcd066f3285aa05bde1006b5dcae222776e7 100755
--- a/thirdparty/libffi/HPKBUILD
+++ b/thirdparty/libffi/HPKBUILD
@@ -20,7 +20,7 @@ pkgrel=0
pkgdesc="The libffi library provides a portable, high level programming interface to various calling conventions."
url="https://github.com/libffi/libffi"
archs=("armeabi-v7a" "arm64-v8a")
-license=("MIT")
+license=("MIT" "GPL-2.0-only")
depends=()
makedepends=("automake" "makeinfo") # makeinfo需要安装的是texinfo
# 官方下载地址https://github.com/libffi/$pkgname/archive/refs/tags/$pkgver.tar.gz受网络影响可能存在下载失败的情况,现使用gitee镜像可以与官方仓库保持同步
diff --git a/thirdparty/libffi/README.OpenSource b/thirdparty/libffi/README.OpenSource
index e703a5319024446e9df8ff2c155ea59a1d23d3bd..daa71ce6ad00bdaa40bd449e44cad2df1eada79e 100644
--- a/thirdparty/libffi/README.OpenSource
+++ b/thirdparty/libffi/README.OpenSource
@@ -1,11 +1,11 @@
[
{
"Name": "libffi",
- "License": "MIT",
- "License File": "LICENSE",
+ "License": "MIT and GPL-2.0-only",
+ "License File": ["https://github.com/libffi/libffi/blob/master/LICENSE","https://github.com/libffi/libffi/blob/master/LICENSE-BUILDTOOLS"],
"Version Number": "3.4.4",
- "Owner": "huangminzhong2@huawei.com",
- "Upstream URL": "https://gitee.com/lycium_pkg_mirror/libffi/repository/archive/v3.4.4.zip",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libffi/libffi/releases/download/v3.4.4/libffi-3.4.4.tar.gz",
"Description": "The libffi library provides a portable, high level programming interface to various calling conventions."
}
]
diff --git a/thirdparty/libffi/README_zh.md b/thirdparty/libffi/README_zh.md
index ada503010eda565c576670cf05f7b088fab23e16..77f80a8c88d05744fe14fec363173c7ed39db10e 100644
--- a/thirdparty/libffi/README_zh.md
+++ b/thirdparty/libffi/README_zh.md
@@ -1,14 +1,12 @@
# libffi三方库说明
## 功能简介
-libffi是一个开源库,提供了一种通用的调用外部函数的机制。
-## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-
-- SDK:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
+libffi是一个开源库,提供了一种通用的调用外部函数的机制。
-- 三方库版本:3.4.4
+## 三方库版本
+- 3.4.4
-- 当前适配功能:允许程序在运行时动态地调用和执行编译时未知的、以及无法预先绑定的函数,支持多种编程语言,可以优化调用函数的性能。
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [系统hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libfuse/README_zh.md b/thirdparty/libfuse/README_zh.md
index fea49eb8063e78ca40ee16d10e1ac5d4a38beb3d..706dfc75ba941cfd0d7ffa2f1f434cbc4d783951 100644
--- a/thirdparty/libfuse/README_zh.md
+++ b/thirdparty/libfuse/README_zh.md
@@ -1,9 +1,12 @@
# libfuse 三方库说明
## 功能简介
FUSE(用户空间中的文件系统)通常作为与libfuse链接的独立应用程序实现。Libfuse提供了挂载文件系统、卸载文件系统、从内核读取请求和发送响应的函数
+
+## 三方库版本
+- fuse-3.16.2
+
## 使用约束
-- SDK版本:ohos_sdk_linux 4.1.3.401
-- 三方库版本:fuse-3.16.2
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libgd/README_zh.md b/thirdparty/libgd/README_zh.md
index 661c43bcd630dcdd5a2fee950f6a6a65a78c9f06..1d3f7ccfb08ebb2c0ebf9aedcc4c8eb7c29c7be7 100644
--- a/thirdparty/libgd/README_zh.md
+++ b/thirdparty/libgd/README_zh.md
@@ -1,9 +1,12 @@
# LIBGD 三方库说明
## 功能简介
用于动态创建图像
+
+## 三方库版本
+- v2.3.4
+
## 使用约束
-- SDK版本:ohos_sdk_linux 5.0.3.100
-- 三方库版本:v2.3.4
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libgd/docs/hap_integrate.md b/thirdparty/libgd/docs/hap_integrate.md
index 75cbd4187df19313ce43e0a550fab74149f7bdb2..f9372475f4b1db8a0b22e8750fb7f80c010d9ea7 100644
--- a/thirdparty/libgd/docs/hap_integrate.md
+++ b/thirdparty/libgd/docs/hap_integrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libgphoto2/HPKBUILD b/thirdparty/libgphoto2/HPKBUILD
index e450a37cdf85692a4a0b46f3e3ae70dd635f77c9..588fb1685e38fe7854a5462ddf57b83aac79c228 100644
--- a/thirdparty/libgphoto2/HPKBUILD
+++ b/thirdparty/libgphoto2/HPKBUILD
@@ -105,7 +105,7 @@ prepare() {
build() {
cd $builddir-$ARCH-build
- ./configure "$@" --host=$host \
+ PKG_CONFIG_LIBDIR="${pkgconfigpath}" ./configure "$@" --host=$host \
CPPFLAGS="-I${LYCIUM_ROOT}/usr/libtool/${ARCH}/include -I${LYCIUM_ROOT}/usr/jpeg/${ARCH}/include \
-I${LYCIUM_ROOT}/usr/libxml2/${ARCH}/include" \
LDFLAGS="-L${LYCIUM_ROOT}/usr/libtool/${ARCH}/lib -L${LYCIUM_ROOT}/usr/jpeg/${ARCH}/lib \
@@ -142,6 +142,11 @@ check() {
return -1
fi
echo "The test must be on an OpenHarmony device!"
+ # 修改测试目录下的工具路径:/usr/bin/sed -> /data/CIusr/bin/sed ; /bin/bash -> /data/CIusr/bin/bash
+ cd $builddir-$ARCH-build/tests
+ sed -i "s#/usr/bin/sed#/data/CIusr/bin/sed#g" `grep -rn "/usr/bin/sed" | awk -F ':' '{print $1}' | sort -u`
+ sed -i "s#/bin/bash#/data/CIusr/bin/bash#g" `grep -rn "/bin/bash" | awk -F ':' '{print $1}' | sort -u`
+ cd $OLDPWD
# real test CMD
# make check-TESTS
}
@@ -161,4 +166,4 @@ recoverpkgbuildenv() {
# 清理环境
cleanbuild(){
rm -rf ${PWD}/$builddir ${PWD}/$builddir-armeabi-v7a-build ${PWD}/$builddir-arm64-v8a-build #${PWD}/$packagename
-}
\ No newline at end of file
+}
diff --git a/thirdparty/libgphoto2/README.OpenSource b/thirdparty/libgphoto2/README.OpenSource
index fe6895ffd6663ddae66b6807f12764cf37000ff5..ede4ff12b3edde35e1474306c37145c2050e4ed2 100644
--- a/thirdparty/libgphoto2/README.OpenSource
+++ b/thirdparty/libgphoto2/README.OpenSource
@@ -2,10 +2,37 @@
{
"Name": "libgphoto2",
"License": "LGPL-2.1",
- "License File": "COPYING",
+ "License File": "https://github.com/gphoto/libgphoto2/blob/master/COPYING",
"Version Number": "v2.5.31",
- "Owner": "huangminzhong2@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/gphoto/libgphoto2/archive/refs/tags/v2.5.31.tar.gz",
"Description": "libgphoto2 is a library that can be used by applications to access various digital cameras."
+ },
+ {
+ "Name": "libtool",
+ "License": "GPL-2.0",
+ "License File": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
+ "Version Number": "2.4.6",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz",
+ "Description": "GNU Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface."
+ },
+ {
+ "Name": "jpeg",
+ "License": "Independent JPEG Group License",
+ "License File": "https://www.ijg.org/files/README",
+ "Version Number": "v9e",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "http://www.ijg.org/files/jpegsrc.v9e.tar.gz",
+ "Description": "IJG is an informal group that writes and distributes a widely used free library for JPEG image compression"
+ },
+ {
+ "Name": "libxml2",
+ "License": " MIT license",
+ "License File": "https://github.com/GNOME/libxml2/blob/master/Copyright",
+ "Version Number": "v2.11.3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.3.tar.gz",
+ "Description": "libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project."
}
]
diff --git a/thirdparty/libgphoto2/README_zh.md b/thirdparty/libgphoto2/README_zh.md
index 61d8dfb8f00c4f4118de7cde2d5ea02c72e15af5..1a15e08787c257765c3fa2ac8b1264b98a93d59c 100644
--- a/thirdparty/libgphoto2/README_zh.md
+++ b/thirdparty/libgphoto2/README_zh.md
@@ -1,11 +1,15 @@
# libgphoto2三方库说明
## 功能简介
libgphoto2是一个功能强大的库,用于通过应用程序访问和控制数字相机。
+
+## 三方库版本
+- v2.5.31
+
+## 已适配功能
+- 支持多种相机的访问和设置,图像捕获和控制,文件传输,延迟拍摄和定时器
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.5.31
-- 当前适配的功能:它支持多种相机的访问和设置,图像捕获和控制,文件传输,延迟拍摄和定时器
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
diff --git a/thirdparty/libharu/README.OpenSource b/thirdparty/libharu/README.OpenSource
index 52778bfe7e81fb68a8eb3a931dcdf66692824a78..13eb1739ce7b2199e44715156e08cbe7ec820ac7 100644
--- a/thirdparty/libharu/README.OpenSource
+++ b/thirdparty/libharu/README.OpenSource
@@ -2,10 +2,28 @@
{
"Name": "libharu",
"License": "zlib License",
- "License File": "LICENSE",
- "Version Number": "libharu-2.4.4",
- "Owner": "huangminzhong2 ",
+ "License File": "https://github.com/libharu/libharu/blob/master/LICENSE",
+ "Version Number": "2.4.4",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/libharu/libharu/archive/refs/tags/v2.4.4.tar.gz",
"Description": "Haru is a free, cross platform, open-sourced software library for generating PDF."
+ },
+ {
+ "Name": "libpng",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
+ "Version Number": "1.6.39",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
+ },
+ {
+ "Name": "zlib",
+ "License": "zlib License",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.2.13",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz",
+ "Description": "A massively spiffy yet delicately unobtrusive compression library."
}
]
diff --git a/thirdparty/libharu/README_zh.md b/thirdparty/libharu/README_zh.md
index 19acb955d3aa96204055adf9db7557140fae2777..6b343cf4690a2410f81a7e0b92e97c945c9b22b1 100644
--- a/thirdparty/libharu/README_zh.md
+++ b/thirdparty/libharu/README_zh.md
@@ -1,11 +1,12 @@
# libharu三方库说明
## 功能简介
libharu是一款免费、跨平台、开源的,用于生成PDF的库。
+
+## 三方库版本
+- v2.4.4
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.4.4
-- 当前适配的功能:实现libharu的工具集.
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libheif/HPKBUILD b/thirdparty/libheif/HPKBUILD
index d6e1a7102161936932dcb30a0cca5667c33b520b..c67baa0670a7bd1c65e89b31ae2f068932711c69 100644
--- a/thirdparty/libheif/HPKBUILD
+++ b/thirdparty/libheif/HPKBUILD
@@ -6,7 +6,7 @@ pkgrel=0
pkgdesc="libheif is an HEIF and AVIF file format decoder and encoder."
url="https://github.com/strukturag/libheif"
archs=("armeabi-v7a" "arm64-v8a")
-license=("GPL-3.0-only")
+license=("LGPL-3.0-only and MIT")
depends=("jpeg" "libpng" "libde265")
makedepends=()
@@ -80,6 +80,9 @@ package() {
check() {
cd $builddir/$ARCH-build/tests
sed -i.bak 's|test-local: heif-unit-tests|test-local: #heif-unit-tests|g' Makefile
+ # 针对测试失败修改工具路径
+ sed -i "s#/bin/bash#/data/CIusr/bin/bash#g" `grep -rn '/bin/bash' | awk -F ':' '{print $1}' | sort -u`
+ sed -i "s#/usr/bin/sed#sed#g" `grep -rn '/usr/bin/sed' | awk -F ':' '{print $1}' | sort -u`
cd $OLDPWD
echo "The test must be on an OpenHarmony device!"
# real test CMD
diff --git a/thirdparty/libheif/README.OpenSource b/thirdparty/libheif/README.OpenSource
index 01c8d3409d37b51b885a1fb448ee5797a9e69596..4f207804b81ad8608fc4c04c6c3c9a63d79b39c6 100644
--- a/thirdparty/libheif/README.OpenSource
+++ b/thirdparty/libheif/README.OpenSource
@@ -1,11 +1,38 @@
[
{
"Name": "libheif",
- "License": "LGPL3.0",
- "License File": "COPYING",
+ "License": "LGPL-3.0-only and MIT",
+ "License File": "https://github.com/strukturag/libheif/blob/master/COPYING",
"Version Number": "v1.15.2",
"Owner": "xiafeng@huawei.com",
- "Upstream URL": "https://github.com/strukturag/libheif",
+ "Upstream URL": "https://github.com/strukturag/libheif/releases/download/v1.15.2/libheif-1.15.2.tar.gz",
"Description": "libheif is an HEIF and AVIF file format decoder and encoder."
+ },
+ {
+ "Name": "jpeg",
+ "License": "Independent JPEG Group License",
+ "License File": "https://www.ijg.org/files/README",
+ "Version Number": "v9e",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "http://www.ijg.org/files/jpegsrc.v9e.tar.gz",
+ "Description": "IJG is an informal group that writes and distributes a widely used free library for JPEG image compression"
+ },
+ {
+ "Name": "libpng",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
+ "Version Number": "1.6.39",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
+ },
+ {
+ "Name": "libde265",
+ "License": "LGPL-3.0-only and MIT",
+ "License File": "https://github.com/strukturag/libde265/blob/master/COPYING",
+ "Version Number": "v1.0.15",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/strukturag/libde265/releases/download/v1.0.15/libde265-1.0.15.tar.gz",
+ "Description": "libde265 is an open source implementation of the h.265 video codec."
}
]
diff --git a/thirdparty/libheif/README_zh.md b/thirdparty/libheif/README_zh.md
index afaf33b67ed8cbe3ff99285dbf069b90a5f75e66..a1ba0737178f4a6bef68472161959761b837835d 100644
--- a/thirdparty/libheif/README_zh.md
+++ b/thirdparty/libheif/README_zh.md
@@ -1,11 +1,15 @@
# libheif三方库说明
## 功能简介
libheif是HEIF和AVIF文件格式编解码三方库。
+
+## 三方库版本
+- v1.15.2
+
+## 已适配功能
+- 支持HEIF和AVIF文件格式编解码
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v1.15.2
-- 当前适配的功能:支持HEIF和AVIF文件格式编解码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libheif/docs/hap_integrate.md b/thirdparty/libheif/docs/hap_integrate.md
index 11f93760d0e59a6106931fed425e9e2e65b05864..79e75d1698c2c109a3c69b2e1d60b3cde0d0e550 100644
--- a/thirdparty/libheif/docs/hap_integrate.md
+++ b/thirdparty/libheif/docs/hap_integrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libhevc/README_zh.md b/thirdparty/libhevc/README_zh.md
index b59ac8cfeaf7078f05f86548d158a14efb8e09f9..90510a5b58b6befc9a6d8897ee95f9bc8adafdc0 100644
--- a/thirdparty/libhevc/README_zh.md
+++ b/thirdparty/libhevc/README_zh.md
@@ -1,11 +1,15 @@
# libhevc三方库说明
## 功能简介
libhevc是一个格式编解码库
+
+## 三方库版本
+- simpleperf-release
+
+## 已适配功能
+- 支持h265格式的视频解码,yuv格式的编码
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:simpleperf-release
-- 当前适配的功能:支持h265格式的视频解码,yuv格式的编码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libical/README_zh.md b/thirdparty/libical/README_zh.md
index e7c7c8f2bbd6f1ec1de8da35f7e8283e1cd502fc..a7efbae20829a7fa78b0cb0a0d8a49d55bfcca09 100755
--- a/thirdparty/libical/README_zh.md
+++ b/thirdparty/libical/README_zh.md
@@ -1,11 +1,12 @@
# libical三方库说明
## 功能简介
libical 是一个开源实现关于iCalendar协议和协议数据单元。
+
+## 三方库版本
+- v3.0.16
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v3.0.16
-- 当前适配的功能:iCalendar协议和协议数据单元。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
\ No newline at end of file
diff --git a/thirdparty/libical/docs/hap_integrate.md b/thirdparty/libical/docs/hap_integrate.md
index 73666251d91f53b6d22582b355fa48c770ade30e..a4ffd42c36469e349e40fc00c1ee3c02918b64d0 100755
--- a/thirdparty/libical/docs/hap_integrate.md
+++ b/thirdparty/libical/docs/hap_integrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libice/HPKBUILD b/thirdparty/libice/HPKBUILD
index 5c55c88689d237322c21fdf059b605672913311d..67a8c5ad9cda0647cbe83379265a0bdfbe3e83c8 100644
--- a/thirdparty/libice/HPKBUILD
+++ b/thirdparty/libice/HPKBUILD
@@ -43,7 +43,7 @@ host=
prepare() {
if $patchflag
then
- patch -p1 < `pwd`/libice_ohos_pkg.patch > $publicbuildlog 2>&1
+ patch -p1 < `pwd`/libice_oh_pkg.patch > $publicbuildlog 2>&1
if [ $? -ne 0 ]
then
echo "patch failed"
@@ -51,7 +51,7 @@ prepare() {
fi
cd $builddir
- patch -p1 < `pwd`/../libice_ohos_test.patch >> $publicbuildlog 2>&1
+ patch -p1 < `pwd`/../libice_oh_test.patch >> $publicbuildlog 2>&1
cd $OLDPWD
# patch只需要打一次,关闭打patch
diff --git a/thirdparty/libice/HPKCHECK b/thirdparty/libice/HPKCHECK
index a9273cda8df43282438103d6098e8ec71342da2b..cf34696abfc3648ecb2118f0207b48d29a807172 100644
--- a/thirdparty/libice/HPKCHECK
+++ b/thirdparty/libice/HPKCHECK
@@ -22,6 +22,13 @@ openharmonycheck() {
cd $builddir-$ARCH-build/example
./icetest > ${logfile} 2>&1
res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "total test 1, test fail" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+ fi
+ echo "total test 1, test pass" >> ${logfile} 2>&1
cd $OLDPWD
return $res
}
diff --git a/thirdparty/libice/README.OpenSource b/thirdparty/libice/README.OpenSource
index f2a85ef3d98d53b7478b8a20c684af573788b647..17e0bd77e7ce329945c9a20ff4b9a7e48689fd55 100644
--- a/thirdparty/libice/README.OpenSource
+++ b/thirdparty/libice/README.OpenSource
@@ -2,7 +2,7 @@
{
"Name": "libice",
"License": "The libice Source License",
- "License File": "LICENSE",
+ "License File": "https://gitlab.freedesktop.org/xorg/lib/libice/-/blob/libICE-1.1.1/COPYING",
"Version Number": "libICE-1.1.1",
"Owner": "huangminzhong2@huawei.com",
"Upstream URL": "https://gitlab.freedesktop.org/xorg/lib/libice",
diff --git a/thirdparty/libice/README_zh.md b/thirdparty/libice/README_zh.md
index 5ae17c628d1e0ec6df524f2c5d66d494fec4e5e8..32b93a7cf6dbc685d16f2d4bea656ba6c80d8d1e 100644
--- a/thirdparty/libice/README_zh.md
+++ b/thirdparty/libice/README_zh.md
@@ -1,9 +1,12 @@
# libice 三方库说明
## 功能简介
libice 是一个c/c++类库,它实现了RFC5245规范定义的交互式连接建立协议,该协议将交互式连接建立(ICE)定义为一种通过offer/answer模型建立的UDP媒体流的NAT穿越技术。
+
+## 三方库版本
+- libICE-1.1.1
+
## 使用约束
-- SDK版本:ohos_sdk_linux 4.1.3.401
-- 三方库版本:libICE-1.1.1
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libice/docs/hap_integrate.md b/thirdparty/libice/docs/hap_integrate.md
index 997ca6f884fa74ba8e2af93defcb9590e50c0605..a5f49d4511589b973dec710ef76467b1de7e7d88 100644
--- a/thirdparty/libice/docs/hap_integrate.md
+++ b/thirdparty/libice/docs/hap_integrate.md
@@ -25,8 +25,8 @@
├── SHA512SUM #三方库校验文件
├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
├── README_zh.md #三方库简介
- ├── libice_ohos_pkg.patch #用于libice库编译的补丁
- ├── libice_ohos_test.patch #用于编译libice库的测试用例的补丁
+ ├── libice_oh_pkg.patch #用于libice库编译的补丁
+ ├── libice_oh_test.patch #用于编译libice库的测试用例的补丁
```
* 在lycium目录下编译三方库
@@ -43,23 +43,23 @@
在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
```shell
- libice/arm64-v8a-build libice/armeabi-v7a-build
+ libice/arm64-v8a libice/armeabi-v7a
```
* [测试三方库](#测试三方库)
## 应用中使用三方库
-- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库拷贝到工程的libs目录下,如下图所示:
+- 将生成动态库的soname文件拷贝到entry/libs目录下,在IDE的cpp目录下新增thirdparty目录将三方库的头文件拷贝到该目录下,如下图所示:

- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
```cmake
- #将三方库加入工程中
- target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libICE.so)
- #将三方库的头文件加入工程中
+ #将三方动态库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libice/${OHOS_ARCH}/lib/libICE.so)
+ #将三方库头文件加入工程中
target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libice/${OHOS_ARCH}/include)
```
diff --git a/thirdparty/libice/docs/pic/libice-dev.png b/thirdparty/libice/docs/pic/libice-dev.png
index 6e6a6e503abf332b3764a8de779e5651a25ad979..2439e865da06a26bc5f78dff41161a9f753d8c73 100644
Binary files a/thirdparty/libice/docs/pic/libice-dev.png and b/thirdparty/libice/docs/pic/libice-dev.png differ
diff --git a/thirdparty/libice/libice_ohos_pkg.patch b/thirdparty/libice/libice_oh_pkg.patch
similarity index 100%
rename from thirdparty/libice/libice_ohos_pkg.patch
rename to thirdparty/libice/libice_oh_pkg.patch
diff --git a/thirdparty/libice/libice_ohos_test.patch b/thirdparty/libice/libice_oh_test.patch
similarity index 100%
rename from thirdparty/libice/libice_ohos_test.patch
rename to thirdparty/libice/libice_oh_test.patch
diff --git a/thirdparty/libid3tag/HPKBUILD b/thirdparty/libid3tag/HPKBUILD
index 3583faf29c9071217b9ae2b5ecc4c763e69747e5..db5137662076bcacc686e70ef83dd023b4093808 100644
--- a/thirdparty/libid3tag/HPKBUILD
+++ b/thirdparty/libid3tag/HPKBUILD
@@ -101,5 +101,5 @@ check() {
}
cleanbuild(){
- rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build #${PWD}/$packagename
+ rm -rf ${PWD}/$builddir $pkgname-armeabi-v7a-build $pkgname-arm64-v8a-build #${PWD}/$packagename
}
diff --git a/thirdparty/libid3tag/README_zh.md b/thirdparty/libid3tag/README_zh.md
index 7433be5af407263b37d740b364b75c7364a0e56d..c575cf46fff38f8a1e4d65c1ad6900b8fe335cfb 100644
--- a/thirdparty/libid3tag/README_zh.md
+++ b/thirdparty/libid3tag/README_zh.md
@@ -1,11 +1,15 @@
# libid3tag三方库说明
## 功能简介
libid3tag是一个用于读取和写入ID3标签的库
+
+## 三方库版本
+- 0.15.1b
+
+## 已适配功能
+- 读取和写入ID3标签
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:0.15.1b
-- 当前适配的功能:读取和写入ID3标签
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/libid3tag/docs/hap_ingtegrate.md b/thirdparty/libid3tag/docs/hap_ingtegrate.md
index 85d0df9e39bba2239c3774cc9eadc24403b2742f..8ae5167f5891f254ae3cb5aac114036009bac3ca 100644
--- a/thirdparty/libid3tag/docs/hap_ingtegrate.md
+++ b/thirdparty/libid3tag/docs/hap_ingtegrate.md
@@ -4,13 +4,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libiec61850/HPKBUILD b/thirdparty/libiec61850/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..b39c6af0c8f4b57c61f3a2bba7fb28aa57ea3053
--- /dev/null
+++ b/thirdparty/libiec61850/HPKBUILD
@@ -0,0 +1,63 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com>, wangying
+# Maintainer: wangyihao<2471389@stu.neu.edu.cn>, wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+pkgname=libiec61850-1.1.1
+pkgver=v1.1.1
+pkgrel=0
+pkgdesc="libiec61850 is an open-source (GPLv3) implementation of an IEC 61850 client and server library implementing the protocols MMS, GOOSE and SV. "
+url="https://github.com/mz-automation/libiec61850/tree/v1.1.1"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("GPL-3.0 license")
+depends=()
+makedepends=()
+source="https://github.com/mz-automation/libiec61850/archive/refs/tags/v1.1.1.zip"
+
+downloadpackage=true
+autounpack=true
+buildtools="cmake"
+
+builddir=libiec61850-1.1.1
+packagename=libiec61850-v1.1.1.zip
+
+prepare() {
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument" \
+ -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir
+}
\ No newline at end of file
diff --git a/thirdparty/libiec61850/HPKCHECK b/thirdparty/libiec61850/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..424c97495f93108ae0869d0f935934b2f20c5164
--- /dev/null
+++ b/thirdparty/libiec61850/HPKCHECK
@@ -0,0 +1,33 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com>, wangying
+# Maintainer: wangyihao<2471389@stu.neu.edu.cn>, wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare(){
+ return 0
+}
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ res=0
+ cd ${builddir}/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ res=$?
+ cd $OLDPWD
+
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/libiec61850/OAT.xml b/thirdparty/libiec61850/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/libiec61850/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libiec61850/README.OpenSource b/thirdparty/libiec61850/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..7bcbfb7097e608aa02044474550ca80f9c6b6f22
--- /dev/null
+++ b/thirdparty/libiec61850/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libiec61850",
+ "License": "GPL-3.0 license",
+ "License File": "https://github.com/mz-automation/libiec61850/blob/v1.5/COPYING",
+ "Version Number": "v1.1.1",
+ "Owner": "2942375747@qq.com",
+ "Upstream URL": "https://github.com/mz-automation/libiec61850",
+ "Description": "libiec61850 is an open-source (GPLv3) implementation of an IEC 61850 client and server library implementing the protocols MMS, GOOSE and SV."
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/libiec61850/README_zh.md b/thirdparty/libiec61850/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..749caa89709f6d85dcfe0b0a9a95d8eb83c9f7f2
--- /dev/null
+++ b/thirdparty/libiec61850/README_zh.md
@@ -0,0 +1,12 @@
+# libiec61850三方库说明
+## 功能简介
+libiec61850是IEC 61850客户端和服务器库的开源(GPLv3)实现,实现了MMS、GOOSE和SV协议。
+
+## 三方库版本
+- v1.1.1
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libiec61850/SHA512SUM b/thirdparty/libiec61850/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..d0e15983d9fbb3a4bbdb6dafc09959dc746a451a
--- /dev/null
+++ b/thirdparty/libiec61850/SHA512SUM
@@ -0,0 +1 @@
+6eb363c440339b636ce289e14102c6151d96c4f313b1882f491621b937b81929befbd8b7ae36fd43c4d9d05768387e233e71719e1a57b3ad94d181715ed86439 libiec61850-v1.1.1.zip
\ No newline at end of file
diff --git a/thirdparty/libiec61850/docs/hap_integrate.md b/thirdparty/libiec61850/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..1d68b18b484158d5d0d70de9ffec86ed09ec4ba3
--- /dev/null
+++ b/thirdparty/libiec61850/docs/hap_integrate.md
@@ -0,0 +1,79 @@
+# libiec61850集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libiec61850 #三方库libiec61850的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+- 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libiec61850
+ ```
+
+- 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libiec61850/arm64-v8a libiec61850/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:
+
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```shell
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libiec61850/${OHOS_ARCH}/lib/libiec61850.so)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libiec61850/${OHOS_ARCH}/include)
+ ```
+
+## 测试三方库
+在lycium目录下执行脚本./test.sh,自动运行thridparty目录下已编译的三方库,
+
+
+```shell
+ cd lycium
+ ./test.sh libiec61850
+```
+ 
+
+## 参考资料
+
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
\ No newline at end of file
diff --git a/thirdparty/libiec61850/docs/pic/libiec61850_install_dir.png b/thirdparty/libiec61850/docs/pic/libiec61850_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..09fea30d8cb1ebc65631a1a0b9ba7060ed42ec34
Binary files /dev/null and b/thirdparty/libiec61850/docs/pic/libiec61850_install_dir.png differ
diff --git a/thirdparty/libiec61850/docs/pic/libiec61850_test.png b/thirdparty/libiec61850/docs/pic/libiec61850_test.png
new file mode 100644
index 0000000000000000000000000000000000000000..ec614f4449b987d5332a43ae81fd4d3c08d19ba2
Binary files /dev/null and b/thirdparty/libiec61850/docs/pic/libiec61850_test.png differ
diff --git a/thirdparty/libiscsi/README.OpenSource b/thirdparty/libiscsi/README.OpenSource
index bb7de6e58fc2210953f888b19b8552c7f6f54f2f..bb0b3f663634c88e1d191c25384256cd27e79980 100644
--- a/thirdparty/libiscsi/README.OpenSource
+++ b/thirdparty/libiscsi/README.OpenSource
@@ -1,12 +1,30 @@
[
{
"Name": "libiscsi",
- "License": "GPL-2-or-later LGPL-2.1-or-later",
- "License File": "COPYING",
+ "License": "GPL-2-or-later and LGPL-2.1-or-later",
+ "License File": ["https://github.com/sahlberg/libiscsi/blob/1.19.0/LICENCE-GPL-2.txt", "https://github.com/sahlberg/libiscsi/blob/1.19.0/LICENCE-LGPL-2.1.txt"],
"Version Number": "1.19.0",
"Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/sahlberg/libiscsi/archive/refs/tags/1.19.0.tar.gz",
"Description": "Libiscsi is a client-side library to implement the iSCSI protocol that can be used to access the resources of an iSCSI target"
+ },
+ {
+ "Name": "libtool",
+ "License": "GPL-2.0",
+ "License File": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
+ "Version Number": "2.4.6",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz",
+ "Description": "GNU Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface."
+ },
+ {
+ "Name": "CUnit",
+ "License": "LGPL-2.0-only",
+ "License File": "https://sourceforge.net/p/cunit/code/HEAD/tree/branches/mingw64/COPYING",
+ "Version Number": "2.1-3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/cunit/files/latest/download",
+ "Description": "CUnit is a Unit testing framework for C."
}
]
diff --git a/thirdparty/libiscsi/README_zh.md b/thirdparty/libiscsi/README_zh.md
index 308d4b84579d7dbecb7fcdefd468315de5d402f6..6f218fc6bcd6749cec1f611f14c38b3bcec49c76 100644
--- a/thirdparty/libiscsi/README_zh.md
+++ b/thirdparty/libiscsi/README_zh.md
@@ -1,11 +1,12 @@
# libiscsi三方库说明
## 功能简介
libiscsi是一个客户端库,用于实现iSCSI协议,可用于访问iSCSI目标的资源
+
+## 三方库版本
+- 1.19.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.19.0
-- 当前适配的功能:实现iSCSI协议
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libjpeg-turbo/HPKBUILD b/thirdparty/libjpeg-turbo/HPKBUILD
index 38461fc6df5c888be7ae2c038d9107831ed09c7d..084df15e7421d3061b9f0ea526534c152dd59cc6 100644
--- a/thirdparty/libjpeg-turbo/HPKBUILD
+++ b/thirdparty/libjpeg-turbo/HPKBUILD
@@ -20,7 +20,7 @@ pkgrel=0
pkgdesc="libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression"
url="https://github.com/libjpeg-turbo/libjpeg-turbo"
archs=("armeabi-v7a" "arm64-v8a")
-license=("IJG(Independent JPEG Group) License", "3-clause BSD License", "zlib License")
+license=("IJG", "BSD 3-clause")
depends=()
makedepends=()
install=usr
diff --git a/thirdparty/libjpeg-turbo/README.OpenSource b/thirdparty/libjpeg-turbo/README.OpenSource
index 77f28acedf18e1fefeadaa0f5bc7cb02bd07171c..f02fa3d1b0ae9af738151bc5162bcddea9a390e5 100755
--- a/thirdparty/libjpeg-turbo/README.OpenSource
+++ b/thirdparty/libjpeg-turbo/README.OpenSource
@@ -1,11 +1,11 @@
[
{
"Name": "libjpeg-turbo",
- "License": "IJG(Independent JPEG Group) License/3-clause BSD License/zlib License",
- "License File": "LICENSE.md",
+ "License": "IJG and BSD 3-clause",
+ "License File": ["https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/README.ijg","https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md"],
"Version Number": "2.1.91",
- "Owner": "zhongluping1@huawei.com",
- "Upstream URL": "https://gitee.com/mirrors/libjpeg-turbo/repository/archive/2.1.91.zip",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.1.91.tar.gz",
"Description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression"
}
]
diff --git a/thirdparty/libjpeg-turbo/README_zh.md b/thirdparty/libjpeg-turbo/README_zh.md
index fdfcd5a46ca482dfeafbbcb2f60dc24cdaa212a0..3e19d3908208d0d88c82ae075fbd3913e09404b1 100755
--- a/thirdparty/libjpeg-turbo/README_zh.md
+++ b/thirdparty/libjpeg-turbo/README_zh.md
@@ -1,15 +1,16 @@
# libjpeg-turbo 三方库说明
## 功能简介
-
libjpeg-turbo是一种JPEG图像编解码器,它使用SIMD指令来加速基准JPEG压缩和解压缩.
-## 使用约束
+## 三方库版本
+- 2.1.91
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:2.1.91
-- 当前适配的功能:支持JPEG图像编解码。
+## 已适配功能
+- 支持JPEG图像编解码。
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
diff --git a/thirdparty/libkate/HPKBUILD b/thirdparty/libkate/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..86bd9b7d4d44dc398fa4955dced807950d5c731c
--- /dev/null
+++ b/thirdparty/libkate/HPKBUILD
@@ -0,0 +1,116 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,duanjf <605126199@qq.com>
+# Maintainer: Jeff Han
+
+pkgname=libkate
+pkgver=distrotech-libkate-0.4.1
+pkgrel=0
+pkgdesc="libkate is an open source library for working with Kate stream metadata."
+url="https://github.com/Distrotech/libkate"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("BSD-3-Clause")
+depends=()
+makedepends=("automake" "autoconf")
+source="https://github.com/Distrotech/$pkgname/archive/refs/tags/$pkgver.zip"
+
+downloadpackage=true
+autounpack=true
+buildtools="configure"
+
+source envset.sh
+host=
+automakeVersion=
+builddir=$pkgname-${pkgver}
+packagename=$builddir.zip
+
+prepare() {
+ cp -rf $builddir $pkgname-$ARCH-build
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ setarm32ENV
+ host=arm-linux
+ fi
+ if [ $ARCH == "arm64-v8a" ]
+ then
+ setarm64ENV
+ host=aarch64-linux
+ fi
+ cd $pkgname-$ARCH-build
+ #获取到automake的版本号
+ automakeVersion=$(automake --version | awk '/^automake \(GNU automake\) / {split($NF, a, "."); print a[1] "." a[2]}')
+ sed -i.bak "s/^am__api_version=.*/am__api_version='${automakeVersion}'/" configure
+ #原库automake写死了,换了版本后warning太多,去掉-Werror
+ sed -i.bak '/AM_INIT_AUTOMAKE(\[-Wall -Werror foreign subdir-objects\])/c\AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])' configure.ac
+ cd ${OLDPWD}
+}
+
+build() {
+ cd $pkgname-$ARCH-build
+ ./autogen.sh "$@" --host=$host > $buildlog 2>&1
+ ${MAKE} >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $pkgname-$ARCH-build
+ ${MAKE} install >> $build.log 2>&1
+ ret=$?
+ cd $OLDPWD
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ unsetarm32ENV
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ unsetarm64ENV
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+ unset host
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ #替换测试文件中sed的路径
+ cd $pkgname-$ARCH-build/tests
+ for file in check_sizes language metadata overflow text; do
+ sed -i.bak 's|/usr/bin/sed|/data/CIusr/bin/sed|g' "$file"
+ done
+ #注释掉测试的编译阶段
+ sed -i.bak '/^all: all-am$/,/^\t@:$/s/^/#/' Makefile
+ cd $OLDPWD
+ #修改libtool中SED的路径
+ cd $pkgname-$ARCH-build
+ sed -i.bak 's|/usr/bin/sed|/data/CIusr/bin/sed|g' libtool
+ sed -i.bak 's|/usr/bin/grep|/data/CIusr/bin/grep|g' libtool
+ sed -i.bak 's|/usr/bin/grep -E|/data/CIusr/bin/grep -E|g' libtool
+ sed -i.bak 's|/usr/bin/grep -F|/data/CIusr/bin/grep -F|g' libtool
+ cd $OLDPWD
+ #复制test-driver工具
+ cd $pkgname-$ARCH-build/misc/autotools
+ cp -p "$(readlink test-driver)" ../
+ rm test-driver
+ cp -p ../test-driver .
+ rm ../test-driver
+ cd $OLDPWD
+}
+
+# 清理环境
+cleanbuild() {
+ rm -rf ${PWD}/$builddir ${PWD}/$pkgname-armeabi-v7a-build ${PWD}/$pkgname-arm64-v8a-build
+}
\ No newline at end of file
diff --git a/thirdparty/libkate/HPKCHECK b/thirdparty/libkate/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..6b6bcfff87ca74caf2866d241856b71f3c674abf
--- /dev/null
+++ b/thirdparty/libkate/HPKCHECK
@@ -0,0 +1,27 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,duanjf <605126199@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ res=0
+ cd $pkgname-$ARCH-build/tests
+ make check-TESTS > ${logfile} 2>&1
+ res=$?
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/libkate/OAT.xml b/thirdparty/libkate/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/libkate/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libkate/README.OpenSource b/thirdparty/libkate/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..fabb206040f33d165f72757cba28917b66c3903c
--- /dev/null
+++ b/thirdparty/libkate/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libkate",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/Distrotech/libkate/blob/distrotech-libkate/COPYING",
+ "Version Number": "libkate-distrotech-libkate-0.4.1",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/Distrotech/libkate",
+ "Description": "libkate is an open source library for working with Kate stream metadata."
+ }
+]
diff --git a/thirdparty/libkate/README_zh.md b/thirdparty/libkate/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..917052030d75f69d186ab79a2a11be0c2cb5783b
--- /dev/null
+++ b/thirdparty/libkate/README_zh.md
@@ -0,0 +1,12 @@
+# libkate三方库说明
+## 功能简介
+- libkate是一个用于处理Kate流元数据的开源库
+
+## 三方库版本
+- libkate-distrotech-libkate-0.4.1
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libkate/SHA512SUM b/thirdparty/libkate/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..4470ea5f62f013503a9204fcea17ed9c271fd9b0
--- /dev/null
+++ b/thirdparty/libkate/SHA512SUM
@@ -0,0 +1 @@
+abf0e98001d08ed20912d38b20945e3cb1023194826bc4468c17da04a9ab10ebadbd9bbd235ea53696f7d7d1bca71f6d3e21e84abb7cca8b77426783af1714aa libkate-distrotech-libkate-0.4.1.zip
diff --git a/thirdparty/libkate/docs/hap_integrate.md b/thirdparty/libkate/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..edf7c6a0f0b51b4fe81b0486d0f76680da59bd24
--- /dev/null
+++ b/thirdparty/libkate/docs/hap_integrate.md
@@ -0,0 +1,86 @@
+# libkate集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libkate #三方库libkate的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKBUILD #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md
+ ├── OAT.xml
+ ```
+
+- 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libkate
+ ```
+
+- 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libkate/arm64-v8a libkate/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```shell
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkate/${OHOS_ARCH}/lib/libkate.a)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkate/${OHOS_ARCH}/include)
+ ```
+
+
+
+
+## 测试三方库
+
+三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+进入到构建目录的tests目录,执行如下命令make check-TESTS(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)
+
+```shell
+cd /data/tpc_c_cplusplus/thirdparty/libkate/libkate-armeabi-v7a-build/tests #进入到构建目录的tests目录
+
+make check-TESTS
+```
+
+跳过的测试用例是因为原测试用例中只识别x86_64和i386架构,所以跳过
+
+
+
+## 参考资料
+
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md)
\ No newline at end of file
diff --git a/thirdparty/libkate/docs/pic/libkate_install_dir.png b/thirdparty/libkate/docs/pic/libkate_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..5f2b3452544fe52377276fd51943e14c1f18f376
Binary files /dev/null and b/thirdparty/libkate/docs/pic/libkate_install_dir.png differ
diff --git a/thirdparty/libkate/docs/pic/libkate_test.png b/thirdparty/libkate/docs/pic/libkate_test.png
new file mode 100644
index 0000000000000000000000000000000000000000..37a78290ec71f0e1f194012a377999ab19cfe76c
Binary files /dev/null and b/thirdparty/libkate/docs/pic/libkate_test.png differ
diff --git a/thirdparty/libkate/docs/pic/libkate_usage.png b/thirdparty/libkate/docs/pic/libkate_usage.png
new file mode 100644
index 0000000000000000000000000000000000000000..098c355cb714baf7362a788316c5ec32bf156fd7
Binary files /dev/null and b/thirdparty/libkate/docs/pic/libkate_usage.png differ
diff --git a/thirdparty/libkml/HPKBUILD b/thirdparty/libkml/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..c5dfc463714bd3c41bdc08a50bde7426698e4055
--- /dev/null
+++ b/thirdparty/libkml/HPKBUILD
@@ -0,0 +1,94 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+
+pkgname=libkml
+pkgver=master
+pkgrel=0
+pkgdesc="Libkml is an open-source C++library used for parsing and generating KML (Keyhole Markup Language) files. KML is an XML based file format used to represent geospatial data and is widely used in geographic information systems such as Google Earth and Google Maps."
+url="https://github.com/libkml/libkml"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("")
+depends=("boost" "googletest" "uriparser" "libexpat" "minizip-ng-1.2" "zlib")
+makedepends=()
+autounpack=true
+downloadpackage=true
+buildtools="cmake"
+
+commitid="916a801ed3143ab82c07ec108bad271aa441da16"
+source="https://github.com/libkml/libkml/archive/${commitid}.zip"
+
+builddir=${pkgname}-${commitid}
+packagename=${builddir}.zip
+
+patchflag=true
+
+prepare() {
+ if $patchflag
+ then
+ cd $builddir
+ patch -p1 < `pwd`/../libkml_oh_pkg.patch >> $publicbuildlog 2>&1
+ # /tmp·ûȨ дĿ¼ /tmp ΪɷʵĿ¼
+ # patchֻҪһ,رմpatch
+ patchflag=false
+ cd $OLDPWD
+ fi
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DBUILD_TESTING=ON -DOHOS_ALLOW_UNDEFINED_SYMBOLS=ON\
+ -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} \
+ -I${LYCIUM_ROOT}/usr/libexpat/${ARCH}/include \
+ -I${LYCIUM_ROOT}/usr/uriparser/$ARCH/include \
+ -I${LYCIUM_ROOT}/usr/minizip-ng-1.2/${ARCH}/include \
+ -I${LYCIUM_ROOT}/usr/googletest/${ARCH}/include \
+ -L${LYCIUM_ROOT}/usr/zlib/${ARCH}/lib \
+ -L${LYCIUM_ROOT}/usr/minizip-ng-1.2/${ARCH}/lib \
+ -L${LYCIUM_ROOT}/usr/libexpat/${ARCH}/lib \
+ -lz -laes -lminizip -lexpat" \
+ -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} \
+ -I${LYCIUM_ROOT}/usr/libexpat/${ARCH}/include \
+ -I${LYCIUM_ROOT}/usr/uriparser/$ARCH/include \
+ -I${LYCIUM_ROOT}/usr/minizip-ng-1.2/${ARCH}/include \
+ -I${LYCIUM_ROOT}/usr/googletest/${ARCH}/include \
+ -L${LYCIUM_ROOT}/usr/zlib/${ARCH}/lib \
+ -L${LYCIUM_ROOT}/usr/minizip-ng-1.2/${ARCH}/lib \
+ -L${LYCIUM_ROOT}/usr/libexpat/${ARCH}/lib \
+ -lz -laes -lminizip -lexpat" \
+ -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir
+}
diff --git a/thirdparty/libkml/HPKCHECK b/thirdparty/libkml/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..d571556b33c241c0c78897176913e579ce0265df
--- /dev/null
+++ b/thirdparty/libkml/HPKCHECK
@@ -0,0 +1,36 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ # 因测试需要,手动测试和执行自动化测试前需执行mkdir -p /data/storage/el2/base/temp创建测试目录
+ mkdir -p /data/storage/el2/base/temp
+ res=0
+ cd ${builddir}/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ];then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ fi
+ # 测试完成后,删除由mkdir -p创建出来的目录
+ rm -rf /data/storage/el2
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/libkml/OAT.xml b/thirdparty/libkml/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/libkml/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libkml/README.OpenSource b/thirdparty/libkml/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..e636626a6e206c60fdf0ce0778529c76e4ebaf6e
--- /dev/null
+++ b/thirdparty/libkml/README.OpenSource
@@ -0,0 +1,65 @@
+[
+ {
+ "Name": "libkml",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/libkml/libkml/blob/master/LICENSE",
+ "Version Number": "",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/libkml/libkml",
+ "Description": "Libkml is an open-source C++library used for parsing and generating KML (Keyhole Markup Language) files. KML is an XML based file format used to represent geospatial data and is widely used in geographic information systems such as Google Earth and Google Maps."
+ },
+ {
+ "Name": "boost",
+ "License": "BSL-1.0",
+ "License File": "https://www.boost.org/LICENSE_1_0.txt",
+ "Version Number": "1.81.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz",
+ "Description": "Boost provides free peer-reviewed portable C++ source libraries."
+ },
+ {
+ "Name": "googletest",
+ "License": "BSD-3-Clause license",
+ "License File": "https://github.com/google/googletest/blob/main/LICENSE",
+ "Version Number": "v1.13.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
+ "Description": "Google Testing and Mocking Framework"
+ },
+ {
+ "Name": "uriparser",
+ "License": "BSD 3-Clause License",
+ "License File": "https://github.com/uriparser/uriparser/blob/master/COPYING",
+ "Version Number": "uriparser-0.9.8",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/uriparser/uriparser",
+ "Description": "uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89."
+ },
+ {
+ "Name": "libexpat",
+ "License": "MIT",
+ "License File": "COPYING",
+ "Version Number": "R_2_5_0",
+ "Owner": "wupingyuan@huawei.com",
+ "Upstream URL": "https://github.com/libexpat/libexpat/archive/refs/tags/R_2_5_0.tar.gz",
+ "Description": "Fast streaming XML parser written in C99."
+ },
+ {
+ "Name": "zlib",
+ "License": "zlib License",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.2.13",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz",
+ "Description": "A massively spiffy yet delicately unobtrusive compression library."
+ },
+ {
+ "Name": "minizip-ng",
+ "License": "zlib",
+ "License File": "https://github.com/zlib-ng/minizip-ng/blob/develop/LICENSE",
+ "Version Number": "8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/zlib-ng/minizip-ng/tree/1.2",
+ "Description": "minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux."
+ }
+]
diff --git a/thirdparty/libkml/README_zh.md b/thirdparty/libkml/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..52fe76d2ee7a35937b4a4603d69737888b80c2dd
--- /dev/null
+++ b/thirdparty/libkml/README_zh.md
@@ -0,0 +1,12 @@
+# libkml三方库说明
+## 功能简介
+libkml 是一个开源的 C++ 库,用于解析和生成 KML(Keyhole Markup Language)文件。KML 是一种基于 XML 的文件格式,用于表示地理空间数据,并广泛应用于 Google Earth、Google Maps 等地理信息系统。
+
+## 三方库版本
+- 916a801ed3143ab82c07ec108bad271aa441da16
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
+- [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libkml/SHA512SUM b/thirdparty/libkml/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..239ea25435cc582a781de48c263bda2ec96f0184
--- /dev/null
+++ b/thirdparty/libkml/SHA512SUM
@@ -0,0 +1 @@
+fcc8ac82a63da32e3859edfc00763b8c62d935978afe75a4c3596edb3223ef5923ea42a149059d81b2c7d90f701c5b063d2f525689de8231fa50edaa0afcfa7f libkml-916a801ed3143ab82c07ec108bad271aa441da16.zip
diff --git a/thirdparty/libkml/docs/hap_integrate.md b/thirdparty/libkml/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..994951ac78e9453e1330fba718db045e8a287240
--- /dev/null
+++ b/thirdparty/libkml/docs/hap_integrate.md
@@ -0,0 +1,90 @@
+# libkml集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libkml #三方库libkml的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libkml
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libkml/arm64-v8a libkml/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下;
+- 在IDE的cpp目录下新增thirdparty目录,将原库生成的so文件、头文件及依赖库的so拷贝到该目录下;将依赖库的SONAME名字的动态库拷贝到libs目录下,按如下图所示使用
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmlbase.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmlconvenience.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmldom.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmlengine.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmlregionator.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/lib/libkmlxsd.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libexpat/${OHOS_ARCH}/lib/libexpat.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/uriparser/${OHOS_ARCH}/lib/liburiparser.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.so)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libkml/${OHOS_ARCH}/include/)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+
+ ```
+ cd /data/tpc_c_cplusplus/thirdparty/libkml/libkml-916a801ed3143ab82c07ec108bad271aa441da16/armeabi-v7a-build
+ ctest
+ ```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [libkml三方库地址](https://github.com/libkml/libkml)
diff --git a/thirdparty/libkml/docs/pic/libkml-dev.png b/thirdparty/libkml/docs/pic/libkml-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..bd1375fbaee3a398049ba6b507dd7572ff6f7547
Binary files /dev/null and b/thirdparty/libkml/docs/pic/libkml-dev.png differ
diff --git a/thirdparty/libkml/docs/pic/test-cmd-ret.png b/thirdparty/libkml/docs/pic/test-cmd-ret.png
new file mode 100644
index 0000000000000000000000000000000000000000..9175bb61afc2e3705c783a1d7292e003e9a5dc24
Binary files /dev/null and b/thirdparty/libkml/docs/pic/test-cmd-ret.png differ
diff --git a/thirdparty/libkml/libkml_oh_pkg.patch b/thirdparty/libkml/libkml_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1bc3d7f6c0ade6005402c23ea98779f8243eb8ca
--- /dev/null
+++ b/thirdparty/libkml/libkml_oh_pkg.patch
@@ -0,0 +1,12 @@
+diff -Naur libkml-916a801ed3143ab82c07ec108bad271aa441da16/src/kml/base/file_posix.cc libkml-916a801ed3143ab82c07ec108bad271aa441da16_new/src/kml/base/file_posix.cc
+--- libkml-916a801ed3143ab82c07ec108bad271aa441da16/src/kml/base/file_posix.cc 2024-08-08 15:14:26.322291262 +0800
++++ libkml-916a801ed3143ab82c07ec108bad271aa441da16_new/src/kml/base/file_posix.cc 2024-08-08 15:15:00.022291117 +0800
+@@ -64,7 +64,7 @@
+ return false;
+ }
+ mode_t temp_umask = umask(S_IXUSR | S_IRWXG | S_IRWXO);
+- char temp_path[] = "/tmp/libkmlXXXXXX";
++ char temp_path[] = "/data/storage/el2/base/temp/libkmlXXXXXX";
+ int fd = mkstemp(temp_path);
+ umask(temp_umask);
+ if (fd == -1) {
diff --git a/thirdparty/liblinear/README_zh.md b/thirdparty/liblinear/README_zh.md
index 1ee4d16f8724758cbf29013813a1c7223c1b1913..8233d50745025785616c1fb16e9d537348c43c4b 100644
--- a/thirdparty/liblinear/README_zh.md
+++ b/thirdparty/liblinear/README_zh.md
@@ -1,11 +1,15 @@
# liblinear三方库说明
## 功能简介
liblinear 是一个用于解决线性规划、回归算法和异常检测的库。
+
+## 三方库版本
+- 2.4.6
+
+## 已适配功能
+- 提供线性规划、SVM、异常检测等。
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:2.4.6
-- 当前适配的功能:提供线性规划、SVM、异常检测等。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
\ No newline at end of file
diff --git a/thirdparty/liblinear/docs/hap_integrate.md b/thirdparty/liblinear/docs/hap_integrate.md
index adcb7311421cf070ef2c77509be71951cc231e6f..a2ea1aa1ebda544d8e4ddbd3518c1eb898a1cf77 100755
--- a/thirdparty/liblinear/docs/hap_integrate.md
+++ b/thirdparty/liblinear/docs/hap_integrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libmad/README_zh.md b/thirdparty/libmad/README_zh.md
index 5155859b41369b687209426938830d4dcc2173ca..2092fdbc76cb7c77f1b78464241763dff4fda402 100644
--- a/thirdparty/libmad/README_zh.md
+++ b/thirdparty/libmad/README_zh.md
@@ -1,11 +1,12 @@
# libmad 三方库说明
## 功能简介
libmad - MPEG 音频解码器库
+
+## 三方库版本
+- c2f96fa4166446ac99449bdf6905f4218fb7d6b5
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:c2f96fa4166446ac99449bdf6905f4218fb7d6b5
-- libmad - MPEG 音频解码器库
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmad/docs/hap_integrate.md b/thirdparty/libmad/docs/hap_integrate.md
index 824844f1aa7a8ac4062adde120ba15f41681390d..01d2c152c2c110a7cc8e88460071bcc44d829f61 100644
--- a/thirdparty/libmad/docs/hap_integrate.md
+++ b/thirdparty/libmad/docs/hap_integrate.md
@@ -2,13 +2,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libmdbx/README_zh.md b/thirdparty/libmdbx/README_zh.md
index 0e5fff4572e79e9244a746e6eb110bcf4d2e47cb..c2b034da8d9a503ee50483af0fc9dcbbb6d62729 100644
--- a/thirdparty/libmdbx/README_zh.md
+++ b/thirdparty/libmdbx/README_zh.md
@@ -1,9 +1,12 @@
# libmdbx 三方库说明
## 功能简介
libmdbx是一个非常快速、紧凑、强大的嵌入式事务性键值数据库,具有宽松的许可证。有一组特定的属性和功能,专注于创建独特的轻量级解决方案。
+
+## 三方库版本
+- 0.11.6
+
## 使用约束
-- SDK版本:ohos_sdk_linux 4.1.3.401
-- 三方库版本:0.11.6
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmediasoupclient/README_zh.md b/thirdparty/libmediasoupclient/README_zh.md
index 387d6c2c12147e1c8eedd21068acb2a4e53155b4..6cd2417fe6e759ea4a37a7b25186819f3539fba9 100644
--- a/thirdparty/libmediasoupclient/README_zh.md
+++ b/thirdparty/libmediasoupclient/README_zh.md
@@ -1,11 +1,12 @@
# libmediasoupclient三方库说明
## 功能简介
libmediasoupclient是一个C++客户端库,用于构建基于 mediasoup 的应用程序。
+
+## 三方库版本
+- 3.4.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:3.4.0
-- 当前适配的功能:mediasoup的初始化,版本号查询在数据传输时进行JSON格式的解析
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/libmediasoupclient/docs/hap_ingtegrate.md b/thirdparty/libmediasoupclient/docs/hap_ingtegrate.md
index 2b97537876e0a857383f2de48b8e30f4b5e3e65b..22b5e2dfe1433de049096859aecd2d13b769ee85 100644
--- a/thirdparty/libmediasoupclient/docs/hap_ingtegrate.md
+++ b/thirdparty/libmediasoupclient/docs/hap_ingtegrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libmng/HPKBUILD b/thirdparty/libmng/HPKBUILD
index b1121562b7996bd4361e9076e678f35725dbe467..1aa487806aa9a2e0f33a88f9ff1dcef6f7d90ed0 100644
--- a/thirdparty/libmng/HPKBUILD
+++ b/thirdparty/libmng/HPKBUILD
@@ -22,7 +22,7 @@ MNG is the animation extension to the popular PNG image-format."
url="https://sourceforge.net/projects/libmng/"
archs=("armeabi-v7a" "arm64-v8a")
license=("The libmng Source License")
-depends=("zlib" "jpeg" "lcms2")
+depends=("zlib_1_3_1" "jpeg" "lcms2")
makedepends=()
source="https://cfhcable.dl.sourceforge.net/project/$pkgname/$pkgname-devel/$pkgver/$pkgname-$pkgver.tar.gz"
@@ -50,6 +50,10 @@ package() {
cd $builddir
$MAKE -C $ARCH-build install >> $buildlog 2>&1
cd $OLDPWD
+ if [ "$ARCH" == "arm64-v8a" ]
+ then
+ mv "${LYCIUM_ROOT}/usr/libmng/$ARCH/lib64" "${LYCIUM_ROOT}/usr/libmng/$ARCH/lib"
+ fi
}
check() {
@@ -66,11 +70,11 @@ check() {
-L $LYCIUM_ROOT/usr/libmng/$ARCH/lib \
-L $LYCIUM_ROOT/usr/jpeg/$ARCH/lib \
-L $LYCIUM_ROOT/usr/lcms2/$ARCH/lib \
- -L $LYCIUM_ROOT/usr/zlib/$ARCH/lib \
+ -L $LYCIUM_ROOT/usr/zlib_1_3_1/$ARCH/lib \
-I $LYCIUM_ROOT/usr/libmng/$ARCH/include \
-I $LYCIUM_ROOT/usr/jpeg/$ARCH/include \
-I $LYCIUM_ROOT/usr/lcms2/$ARCH/include \
- -I $LYCIUM_ROOT/usr/zlib/$ARCH/include \
+ -I $LYCIUM_ROOT/usr/zlib_1_3_1/$ARCH/include \
contrib/gcc/mngtree/mngtree.c \
-o ./$ARCH-build/bin/mngtree >> $buildlog 2>&1
else
@@ -78,14 +82,14 @@ check() {
--target=aarch64-linux-ohos \
--sysroot=${OHOS_SDK}/native/sysroot \
-lm -lmng -lz -ljpeg -llcms2 \
- -L $LYCIUM_ROOT/usr/libmng/$ARCH/lib64 \
+ -L $LYCIUM_ROOT/usr/libmng/$ARCH/lib \
-L $LYCIUM_ROOT/usr/jpeg/$ARCH/lib \
-L $LYCIUM_ROOT/usr/lcms2/$ARCH/lib \
- -L $LYCIUM_ROOT/usr/zlib/$ARCH/lib \
+ -L $LYCIUM_ROOT/usr/zlib_1_3_1/$ARCH/lib \
-I $LYCIUM_ROOT/usr/libmng/$ARCH/include \
-I $LYCIUM_ROOT/usr/jpeg/$ARCH/include \
-I $LYCIUM_ROOT/usr/lcms2/$ARCH/include \
- -I $LYCIUM_ROOT/usr/zlib/$ARCH/include \
+ -I $LYCIUM_ROOT/usr/zlib_1_3_1/$ARCH/include \
contrib/gcc/mngtree/mngtree.c \
-o ./$ARCH-build/bin/mngtree >> $buildlog 2>&1
fi
diff --git a/thirdparty/libmng/HPKCHECK b/thirdparty/libmng/HPKCHECK
index 8fad6aff40bb3fd1ebc3de77da1b405414bf41cb..0a30d8d3a1216d3e6161bc7cde9e2a6f2c2f56a5 100644
--- a/thirdparty/libmng/HPKCHECK
+++ b/thirdparty/libmng/HPKCHECK
@@ -22,6 +22,13 @@ openharmonycheck() {
cd ${builddir}/${ARCH}-build/bin
./mngtree ../../contrib/gcc/gtk-mng-view/linux.mng > ${logfile} 2>&1
res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "total test 1, test fail" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+ fi
+ echo "total test 1, test pass" >> ${logfile} 2>&1
cd $OLDPWD
return $res
}
diff --git a/thirdparty/libmng/README.OpenSource b/thirdparty/libmng/README.OpenSource
index ad2e6f86732d0c20d707584de5a6064f0b569be3..9f3cdd99758a7de32ff748bd44d6007cc0b18842 100644
--- a/thirdparty/libmng/README.OpenSource
+++ b/thirdparty/libmng/README.OpenSource
@@ -2,10 +2,37 @@
{
"Name": "libmng",
"License": "The libmng Source License",
- "License File": "LICENSE",
+ "License File": "https://github.com/Enseed/libmng/blob/v2.0.3/LICENSE",
"Version Number": "2.0.3",
"Owner": "huangminzhong2@huawei.com",
"Upstream URL": "https://cfhcable.dl.sourceforge.net/project/libmng/libmng-devel/2.0.3/libmng-2.0.3.tar.gz",
"Description": "libmng -THE reference library for reading, displaying, writing and examining Multiple-Image Network Graphics"
+ },
+ {
+ "Name": "zlib_1_3_1",
+ "License": "Zlib",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.3.1",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib",
+ "Description": "zlib 1.3.1 is a general purpose data compression library.All the code is thread safe."
+ },
+ {
+ "Name": "jpeg",
+ "License": "Independent JPEG Group License",
+ "License File": "https://www.ijg.org/files/README",
+ "Version Number": "v9e",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "http://www.ijg.org/files/jpegsrc.v9e.tar.gz",
+ "Description": "IJG is an informal group that writes and distributes a widely used free library for JPEG image compression"
+ },
+ {
+ "Name": "lcms2",
+ "License": " MIT license",
+ "License File": "https://github.com/mm2/Little-CMS/blob/lcms2.15/COPYING",
+ "Version Number": "2.15",
+ "Owner": "hanjinfei@foxmail.com",
+ "Upstream URL": "https://sourceforge.net/projects/lcms/files/lcms/2.15/lcms2-2.15.tar.gz",
+ "Description": "Little cms is a color management library. Implements fast transforms between ICC profiles. It is focused on speed, and is portable across several platforms."
}
-]
+]
\ No newline at end of file
diff --git a/thirdparty/libmng/README_zh.md b/thirdparty/libmng/README_zh.md
index c595cd479cf15b063d4f91037e73edd9c0a279dc..5deb497aba0d87a034ee4b640379dd254ddbe6d5 100644
--- a/thirdparty/libmng/README_zh.md
+++ b/thirdparty/libmng/README_zh.md
@@ -1,9 +1,12 @@
# libmng 三方库说明
## 功能简介
libmng 是用于阅读,显示,写作和检查多图像网络图形的参考库。
+
+## 三方库版本
+- 2.0.3
+
## 使用约束
-- SDK版本:ohos_sdk_linux 4.1.3.401
-- 三方库版本:2.0.3
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmng/docs/hap_integrate.md b/thirdparty/libmng/docs/hap_integrate.md
index fe9201f535ec8ecb6ead1243d946484b91864be0..13f0ed75f8940226634fcc5af43942d8f8682808 100644
--- a/thirdparty/libmng/docs/hap_integrate.md
+++ b/thirdparty/libmng/docs/hap_integrate.md
@@ -48,17 +48,18 @@
## 应用中使用三方库
-- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库拷贝到工程的libs目录下,由于mng库还依赖于jpeg等库,将对应库也一同拷贝到libs,如下图所示:
+- 将libmng及其依赖库生成的动态库soname文件拷贝到entry/libs目录下,在IDE的cpp目录下新增thirdparty目录将libmng库及其依赖库的头文件拷贝到该目录下,如下图所示:

- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
```cmake
- #将三方库加入工程中
- target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libmng.so.2)
- #将三方库的头文件加入工程中
+ #将三方静态库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmng/${OHOS_ARCH}/lib/libmng.so)
+ #将三方库头文件加入工程中
target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmng/${OHOS_ARCH}/include)
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jpeg/${OHOS_ARCH}/include)
```
diff --git a/thirdparty/libmng/docs/pic/libmng-dev.png b/thirdparty/libmng/docs/pic/libmng-dev.png
index 06817f6c4c2debe4962cd43f86c7f2ee9691bf14..514afca565764951760956291459dbf98c1bbf71 100644
Binary files a/thirdparty/libmng/docs/pic/libmng-dev.png and b/thirdparty/libmng/docs/pic/libmng-dev.png differ
diff --git a/thirdparty/libmobi/README_zh.md b/thirdparty/libmobi/README_zh.md
index eaa52a882314da14d9dfdbc0a485534b80279e2b..100984e85ace7439314d8ac21be3c6dadc0242b6 100644
--- a/thirdparty/libmobi/README_zh.md
+++ b/thirdparty/libmobi/README_zh.md
@@ -1,11 +1,15 @@
# libmobi三方库说明
## 功能简介
libmobi是一个用于处理Mobipocket/Kindle(MOBI)电子书格式文档的C库
+
+## 三方库版本
+- v0.11
+
+## 已适配功能
+- MOBI格式解析
+
## 使用约束
-- IDE版本:DevEco Studio NEXT Developer Preview2
-- SDK版本:sdk-linux-5.0.0.13 (API Version 12)
-- 三方库版本:v0.11
-- 当前适配的功能:MOBI格式解析
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmobi/docs/hap_integrate.md b/thirdparty/libmobi/docs/hap_integrate.md
index ec27612ec7613bcc7633f94fd70a900e7da5575f..c804ba07829169ed7753ed9c185de42bd9a465c3 100644
--- a/thirdparty/libmobi/docs/hap_integrate.md
+++ b/thirdparty/libmobi/docs/hap_integrate.md
@@ -1,9 +1,7 @@
# libmobi集成到应用hap
本库是在RK3568开发板上基于OpenHarmony的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu22.04
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libmspack/HPKBUILD b/thirdparty/libmspack/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..89d4362da89d1692c977fba37042cc4619ae26b4
--- /dev/null
+++ b/thirdparty/libmspack/HPKBUILD
@@ -0,0 +1,84 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+pkgname=libmspack
+pkgver=v1.11
+pkgrel=0
+pkgdesc="libmspack is a library for some loosely related Microsoft compression formats: CAB, CHM, HLP, LIT, KWAJ and SZDD."
+url="https://github.com/kyz/libmspack"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("LGPL v2.1")
+depends=()
+makedepends=()
+
+source="https://github.com/kyz/$pkgname/archive/refs/tags/$pkgver.tar.gz"
+downloadpackage=true
+autounpack=true
+buildtools="configure"
+patchflag=true
+
+source envset.sh
+host=
+
+builddir=$pkgname-${pkgver:1}
+packagename=$builddir.tar.gz
+
+prepare() {
+ if [ $ARCH == "arm64-v8a" ];then
+ setarm64ENV
+ host=aarch64-linux
+ elif [ $ARCH == "armeabi-v7a" ];then
+ setarm32ENV
+ host=arm-linux
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+ mkdir -p $builddir/$ARCH-build
+ cp -r $builddir/libmspack $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir/$ARCH-build/$pkgname
+ ./autogen.sh > $buildlog 2>&1
+ ./configure "$@" --host=$host --disable-debug --prefix=$LYCIUM_ROOT/usr/$pkgname/$ARCH >> $buildlog 2>&1
+ $MAKE >> $buildlog 2>&1
+ sed -i.bak '1385,1394d' Makefile >> $buildlog 2>&1
+ sed -i.bak '1615d' Makefile >> $buildlog 2>&1
+ sed -i.bak 's|check-TESTS||g' Makefile >> $buildlog 2>&1
+ $MAKE check >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir/$ARCH-build/$pkgname
+ $MAKE install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ cd $builddir/$ARCH-build/$pkgname/test
+ sed -i.bak 's|/usr/bin/sed|sed|g' kwajd_test >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+# 清理环境
+cleanbuild() {
+ rm -rf ${PWD}/$builddir
+}
\ No newline at end of file
diff --git a/thirdparty/libmspack/HPKCHECK b/thirdparty/libmspack/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..17d57e50cd8ab09ad5f1f9be75157fee1f872cf2
--- /dev/null
+++ b/thirdparty/libmspack/HPKCHECK
@@ -0,0 +1,51 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ res=0
+ cd $builddir/${ARCH}-build/libmspack/test
+ ./cabd_test > ${logfile} 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -1
+ fi
+ echo "test 1: pass" >> ${logfile}
+
+ ./chmd_test >> ${logfile} 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -1
+ fi
+ echo "test 2: pass" >> ${logfile}
+
+ ./kwajd_test >> ${logfile} 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -1
+ fi
+ echo "test 3: pass" >> ${logfile}
+
+ echo "Total test: 3 pass: 3"
+ res=$?
+ cd $OLDPWD
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/libmspack/OAT.xml b/thirdparty/libmspack/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..03ee5a760a1f17e2e86907647046114696ade760
--- /dev/null
+++ b/thirdparty/libmspack/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libmspack/README.OpenSource b/thirdparty/libmspack/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..8af10914d190d00169c639d165f526159a4c3c95
--- /dev/null
+++ b/thirdparty/libmspack/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libmspack",
+ "License": "LGPL v2.1",
+ "License File": "https://github.com/kyz/libmspack/blob/master/libmspack/COPYING.LIB",
+ "Version Number": "v1.11",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/kyz/libmspack",
+ "Description": "libmspack is a library for some loosely related Microsoft compression formats: CAB, CHM, HLP, LIT, KWAJ and SZDD."
+ }
+]
diff --git a/thirdparty/libmspack/README_zh.md b/thirdparty/libmspack/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..7a4420247ee7c67787c6d28e05fe56aefa73ccc2
--- /dev/null
+++ b/thirdparty/libmspack/README_zh.md
@@ -0,0 +1,12 @@
+# libmspack 三方库说明
+## 功能简介
+libmspack 是一个开源库,用于解压缩 MSPACK 格式的文件,这种格式通常用于 CAB(Cabinet)文件的压缩。
+
+## 三方库版本
+- v1.11
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmspack/SHA512SUM b/thirdparty/libmspack/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..82a8cde260deee79f675bd740734fa06081687cd
--- /dev/null
+++ b/thirdparty/libmspack/SHA512SUM
@@ -0,0 +1 @@
+f53a253375584d815ba9249bf36b5f08906c37d7ac7fc9e44040ec5600380f830b2e6774e4493d6fa8024409ae9cf8afe782da52fc8f670debe3aaa4ae6b7306 libmspack-1.11.tar.gz
diff --git a/thirdparty/libmspack/docs/hap_integrate.md b/thirdparty/libmspack/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..80b64164a2fc9bd197319c1ec23448940302f6fd
--- /dev/null
+++ b/thirdparty/libmspack/docs/hap_integrate.md
@@ -0,0 +1,83 @@
+# libmspack集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libmspack #三方库libmspack的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ├── libmspack_ohos_pkg.patch #用于libmspack库编译的补丁
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libmspack
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libmspack/arm64-v8a libmspack/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下;
+- 在IDE的entry目录下新增libs目录,将编译生成的.a文件拷贝到该目录下。如下图所示:
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmspack/${OHOS_ARCH}/lib/libmspack.a)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmspack/${OHOS_ARCH}/include)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+
+ ```
+ cd /data/tpc_c_cplusplus/thirdparty/libmspack/libmspack-1.11/armeabi-v7a-build/libmspack/test/
+ ./kwajd_test
+ ```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [libmspack三方库地址](https://github.com/kyz/libmspack)
diff --git a/thirdparty/libmspack/docs/pic/libmspack-dev.png b/thirdparty/libmspack/docs/pic/libmspack-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..e46677011195dfedcbb164315bf888113b56ee0f
Binary files /dev/null and b/thirdparty/libmspack/docs/pic/libmspack-dev.png differ
diff --git a/thirdparty/libmspack/docs/pic/test-cmd-ret.png b/thirdparty/libmspack/docs/pic/test-cmd-ret.png
new file mode 100644
index 0000000000000000000000000000000000000000..0a711b6b709c4afdb6260103211a8de008f5e568
Binary files /dev/null and b/thirdparty/libmspack/docs/pic/test-cmd-ret.png differ
diff --git a/thirdparty/libmysofa/HPKBUILD b/thirdparty/libmysofa/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..bbe2e2252942a02c968df5f1dd2ec0289e83dc01
--- /dev/null
+++ b/thirdparty/libmysofa/HPKBUILD
@@ -0,0 +1,76 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , wen fan
+# Maintainer: Jeff Han
+
+pkgname=libmysofa
+pkgver=v1.3.2
+pkgrel=
+pkgdesc="This is a simple set of C functions to read AES SOFA files."
+url=https://github.com/hoene/libmysofa
+archs=(armeabi-v7a arm64-v8a)
+license=(BSD-3-Clause)
+depends=(CUnit zlib_1_3_1 bzip2_1_0_8)
+makedepends=()
+
+builddir=${pkgname}-${pkgver:1}
+packagename=${builddir}.tar.gz
+
+source=https://github.com/hoene/${pkgname}/archive/refs/tags/${pkgver}.tar.gz
+
+autounpack=true
+downloadpackage=true
+buildtools=cmake
+patchflag=true
+
+prepare() {
+ mkdir -p ${builddir}/${ARCH}-build
+ if ${patchflag}
+ then
+ cd ${builddir}
+
+ # 注释pthread_cancel函数,屏蔽16个测试改为手动测试,将/tmp 目录改为/data/local/tmp
+ patch -p1 < ../${pkgname}_oh_pkg.patch || return -1
+ echo "patching success"
+ patchflag=false
+ cd ${OLDPWD}
+ fi
+
+ return 0
+}
+
+build() {
+ cd ${builddir}
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -B${ARCH}-build -S./ > ${buildlog} 2>&1 || return -1
+ ${MAKE} -C${ARCH}-build >> ${buildlog} 2>&1 || return -1
+ cd ${OLDPWD}
+ return 0
+}
+
+package() {
+ cd ${builddir}/${ARCH}-build
+ ${MAKE} install >> ${buildlog} 2>&1 || return -1
+ cd ${OLDPWD}
+ return 0
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ return 0
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/${builddir}
+ return 0
+}
diff --git a/thirdparty/libmysofa/HPKCHECK b/thirdparty/libmysofa/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..4b27802c8b97145df735ea91d8b8e96810c88342
--- /dev/null
+++ b/thirdparty/libmysofa/HPKCHECK
@@ -0,0 +1,36 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , wen fan
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare() {
+ return 0
+}
+
+openharmonycheck() {
+ cd ${builddir}/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ ret=$?
+ if [ ${ret} -ne 0 ]
+ then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ fi
+
+ cd ${OLDPWD}
+ return ${ret}
+}
diff --git a/thirdparty/libmysofa/OAT.xml b/thirdparty/libmysofa/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8c1f4a4604b0605aff883a046d2397e0016221b5
--- /dev/null
+++ b/thirdparty/libmysofa/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/thirdparty/libmysofa/README.OpenSource b/thirdparty/libmysofa/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..251551358c281110b11e3621a672dcd6f8d4700d
--- /dev/null
+++ b/thirdparty/libmysofa/README.OpenSource
@@ -0,0 +1,38 @@
+[
+ {
+ "Name": "libmysofa",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/hoene/libmysofa/blob/main/LICENSE",
+ "Version Number": "v1.3.2",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/hoene/libmysofa",
+ "Description": "This is a simple set of C functions to read AES SOFA files."
+ },
+ {
+ "Name": "CUnit",
+ "License": "GNU Library General Public License",
+ "License File": "https://sourceforge.net/p/cunit/code/HEAD/tree/branches/mingw64/COPYING",
+ "Version Number": "2.1-3",
+ "Owner": "tianyong13@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/cunit/files/latest/download",
+ "Description": "CUnit is a Unit testing framework for C."
+ },
+ {
+ "Name": "zlib_1_3_1",
+ "License": "Zlib",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.3.1",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib",
+ "Description": "zlib 1.3.1 is a general purpose data compression library.All the code is thread safe."
+ },
+ {
+ "Name": "bzip2_1_0_8",
+ "License": "bzip2-1.0.6",
+ "License File": "https://sourceforge.net/p/bzip2/bzip2/ci/bzip2-1_0_6/tree/LICENSE",
+ "Version Number": "1.0.8",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://sourceware.org/git/bzip2",
+ "Description": "bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression."
+ }
+]
diff --git a/thirdparty/libmysofa/README_zh.md b/thirdparty/libmysofa/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..019aa1920abf117290dd13790daa9a9deb1e587d
--- /dev/null
+++ b/thirdparty/libmysofa/README_zh.md
@@ -0,0 +1,12 @@
+# libmysofa三方库说明
+## 功能简介
+这是一组简单的C函数,用于读取AES SOFA文件
+
+## 三方库版本
+- v1.3.2
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libmysofa/SHA512SUM b/thirdparty/libmysofa/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..b40d48928234c5aece636644e8977fff31413e19
--- /dev/null
+++ b/thirdparty/libmysofa/SHA512SUM
@@ -0,0 +1 @@
+de7f5d36079b8be06860f3380c7a359e22f59e3e57d86f5f5df1512a20b321e392e2452a34f3ea979779fb84c7493fd4febd386c89b6da4182d6c0cfb0ce1d75 libmysofa-1.3.2.tar.gz
diff --git a/thirdparty/libmysofa/docs/hap_integrate.md b/thirdparty/libmysofa/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..5541e1422620c63bbb35545aae22e4623f61a1f9
--- /dev/null
+++ b/thirdparty/libmysofa/docs/hap_integrate.md
@@ -0,0 +1,105 @@
+# libmysofa集成到应用hap
+本库是在RK3568开发板上基于OpenHarmony的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+## 开发环境
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+## 编译三方库
+- 下载本仓库
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+ ```
+ tpc_c_cplusplus/thirdparty/libmysofa #三方库的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ├── OAT.xml #扫描结果文件
+ ├── libmysofa_oh_pkg.patch #patch文件
+ ```
+
+- 在lycium目录下编译三方库,编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libmysofa
+ ```
+
+- 三方库头文件及生成的库,在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```
+ libmysofa/armeabi-v7a
+ libmysofa/arm64-v8a
+ ```
+
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+- 在IDE的cpp目录下新增thirdparty目录,将生成的静态库文件以及头文件拷贝到该目录下,将依赖库zlib生成的静态库也拷贝到该目录下,如下图所示
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+ ```makefile
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.a)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmysofa/${OHOS_ARCH}/lib/libmysofa.a)
+
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libmysofa/${OHOS_ARCH}/include)
+ ```
+## 测试三方库
+三方库的测试使用原库提供的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+进入到构建目录准备测试,例如目录为arm64-v8a-build,对其中27个用例执行ctest进行测试,如下图所示
+
+```shell
+cd tpc_c_cplusplus/thirdparty/libmysofa/libmysofa-1.3.2-3.11.2/arm64-v8a-build
+ctest
+```
+
+
+
+
+
+剩余16个测试由于不支持node工具,可在执行完./test.sh libmysofa操作之后手动执行,在tpc_c_cplusplus/thirdparty/libmysofa/libmysofa-1.3.2/tests目录下,使用compare.sh和compareIgnoreNew.sh脚本,要先将两个脚本文件里的最后一行删除,保留测试文件,测试步骤为
+
+```shell
+./compareIgnoreNew.sh ./H20_44K_16bit_256tap_FIR_SOFA
+./compare.sh ./MIT_KEMAR_large_pinna
+./compareIgnoreNew.sh ./MIT_KEMAR_normal_pinna
+./compare.sh ./MIT_KEMAR_normal_pinna.old
+./compareIgnoreNew.sh ./dtf_nh2
+./compareIgnoreNew.sh ./hrtf_c_nh898
+./compare.sh ./CIPIC_subject_003_hrir_final
+./compare.sh ./FHK_HRIR_L2354
+./compare.sh ./LISTEN_1002_IRC_1002_C_HRIR
+./compare.sh ./Pulse
+./compare.sh ./Tester
+./compare.sh ./TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m
+./compare.sh ./TU-Berlin_QU_KEMAR_anechoic_radius_0.5m
+./compare.sh ./example_dummy_sofa48
+./compare.sh ./example_dummy_sofa48_with_user_defined_variable
+./compare.sh ./TestSOFA48_netcdf472
+```
+
+每一次测试之后将生成的tmp1.json和tmp2.json改名保存下来,后面将例如arm64-v8a-build构建目录移动至linux环境下进行测试,使用node工具进行测试,每一次测试用例为之前已改名的两个json文件,有两种测试的diff规则,json-diff.js和json-diffIgnoreNew.js,测试结果看执行命令的返回值$?,只要有一个为0则为成功,一个失败就使用另外一个测试,两个都不成功则用例执行测试失败,下方为测试用例举例
+
+```shell
+node ./json-diff.js ./CIPIC_subject_003_hrir_final1.json ./CIPIC_subject_003_hrir_final2.json
+```
+
+```shell
+echo $?
+```
+
+
+
+## 参考资料
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md)
diff --git a/thirdparty/libmysofa/docs/pic/install.dir.png b/thirdparty/libmysofa/docs/pic/install.dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..b813ff6853ac39fe899c0155276c84a6d6cdc8ca
Binary files /dev/null and b/thirdparty/libmysofa/docs/pic/install.dir.png differ
diff --git a/thirdparty/libmysofa/docs/pic/singletest.png b/thirdparty/libmysofa/docs/pic/singletest.png
new file mode 100644
index 0000000000000000000000000000000000000000..0fb9469b66bd830b4f0aa5cb720f29fca0ba0786
Binary files /dev/null and b/thirdparty/libmysofa/docs/pic/singletest.png differ
diff --git a/thirdparty/libmysofa/libmysofa_oh_pkg.patch b/thirdparty/libmysofa/libmysofa_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..29cd9c61a36a4ac4235c07287cb4e677eacc129b
--- /dev/null
+++ b/thirdparty/libmysofa/libmysofa_oh_pkg.patch
@@ -0,0 +1,96 @@
+--- libmysofa-1.3.2/src/tests/multithread.c 2024-07-15 17:32:24.016009100 +0800
++++ libmysofa-1.3.2/src/tests/multithread2.c 2024-07-15 17:30:23.386009100 +0800
+@@ -144,7 +144,7 @@
+ abort();
+ }
+
+- pthread_cancel(watchdog);
++ // pthread_cancel(watchdog);
+
+ mysofa_close(easy);
+
+--- libmysofa-1.3.2/CMakeLists.txt 2024-07-17 16:16:56.291354100 +0800
++++ libmysofa-1.3.2/CMakeLists2.txt 2024-07-17 16:22:23.981354100 +0800
+@@ -59,18 +59,18 @@
+ ${PROJECT_SOURCE_DIR}/tests/latTestAziBeRTA_Resamp1_Fran.sofa)
+ add_test(D1_48K_24bit_0.3s_FIR_SOFA src/mysofa2json
+ ${PROJECT_SOURCE_DIR}/tests/D1_48K_24bit_0.3s_FIR_SOFA.sofa)
+- add_test(H20_44K_16bit_256tap_FIR_SOFA ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
+- ${PROJECT_SOURCE_DIR}/tests/H20_44K_16bit_256tap_FIR_SOFA)
+- add_test(MIT_KEMAR_large_pinna ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_large_pinna)
+- add_test(MIT_KEMAR_normal_pinna ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
+- ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_normal_pinna)
+- add_test(MIT_KEMAR_normal_pinna.old ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_normal_pinna.old)
+- add_test(dtf_nh2 ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
+- ${PROJECT_SOURCE_DIR}/tests/dtf_nh2)
+- add_test(hrtf_c_nh898 ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
+- ${PROJECT_SOURCE_DIR}/tests/hrtf_c_nh898)
++ # add_test(H20_44K_16bit_256tap_FIR_SOFA ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
++ # ${PROJECT_SOURCE_DIR}/tests/H20_44K_16bit_256tap_FIR_SOFA)
++ # add_test(MIT_KEMAR_large_pinna ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_large_pinna)
++ # add_test(MIT_KEMAR_normal_pinna ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
++ # ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_normal_pinna)
++ # add_test(MIT_KEMAR_normal_pinna.old ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/MIT_KEMAR_normal_pinna.old)
++ # add_test(dtf_nh2 ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
++ # ${PROJECT_SOURCE_DIR}/tests/dtf_nh2)
++ # add_test(hrtf_c_nh898 ${PROJECT_SOURCE_DIR}/tests/compareIgnoreNew.sh
++ # ${PROJECT_SOURCE_DIR}/tests/hrtf_c_nh898)
+ foreach(
+ ISSUE
+ 72
+@@ -99,23 +99,23 @@
+ add_test(fail-issue-${ISSUE} ${PROJECT_SOURCE_DIR}/tests/notcrashed.sh
+ ${PROJECT_SOURCE_DIR}/tests/fail-issue-${ISSUE})
+ endforeach(ISSUE)
+- add_test(CIPIC_subject_003_hrir_final ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/CIPIC_subject_003_hrir_final)
+- add_test(FHK_HRIR_L2354 ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/FHK_HRIR_L2354)
+- add_test(LISTEN_1002_IRC_1002_C_HRIR ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/LISTEN_1002_IRC_1002_C_HRIR)
+- add_test(Pulse ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/Pulse)
+- add_test(Tester ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/tester)
+- add_test(TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m)
+- add_test(TU-Berlin_QU_KEMAR_anechoic_radius_0.5m ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/TU-Berlin_QU_KEMAR_anechoic_radius_0.5m)
+- add_test(example_dummy_sofa48 ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/example_dummy_sofa48)
+- add_test(TestSOFA48_netcdf472 ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/TestSOFA48_netcdf472)
+- add_test(example_dummy_sofa48_with_user_defined_variable ${PROJECT_SOURCE_DIR}/tests/compare.sh
+- ${PROJECT_SOURCE_DIR}/tests/example_dummy_sofa48_with_user_defined_variable)
++ # add_test(CIPIC_subject_003_hrir_final ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/CIPIC_subject_003_hrir_final)
++ # add_test(FHK_HRIR_L2354 ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/FHK_HRIR_L2354)
++ # add_test(LISTEN_1002_IRC_1002_C_HRIR ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/LISTEN_1002_IRC_1002_C_HRIR)
++ # add_test(Pulse ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/Pulse)
++ # add_test(Tester ${PROJECT_SOURCE_DIR}/tests/compare.sh ${PROJECT_SOURCE_DIR}/tests/tester)
++ # add_test(TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/TU-Berlin_QU_KEMAR_anechoic_radius_0.5_1_2_3_m)
++ # add_test(TU-Berlin_QU_KEMAR_anechoic_radius_0.5m ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/TU-Berlin_QU_KEMAR_anechoic_radius_0.5m)
++ # add_test(example_dummy_sofa48 ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/example_dummy_sofa48)
++ # add_test(TestSOFA48_netcdf472 ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/TestSOFA48_netcdf472)
++ # add_test(example_dummy_sofa48_with_user_defined_variable ${PROJECT_SOURCE_DIR}/tests/compare.sh
++ # ${PROJECT_SOURCE_DIR}/tests/example_dummy_sofa48_with_user_defined_variable)
+ endif(BUILD_TESTS)
+
+ add_subdirectory(src)
+--- libmysofa-1.3.2/src/tests/easy.c 2023-10-15 18:30:14.000000000 +0800
++++ libmysofa-1.3.2/src/tests/easy2.c 2024-08-08 14:31:38.904707800 +0800
+@@ -154,7 +154,7 @@
+ easy->hrtf->SourcePosition.values = coordinates;
+ easy->hrtf->M = filters;
+
+- file = fopen("/tmp/easy.tmp.json", "w");
++ file = fopen("/data/local/tmp/easy.tmp.json", "w");
+ CU_ASSERT(file != NULL);
+ printJson(file, easy->hrtf, 0);
+ fclose(file);
diff --git a/thirdparty/libosip2/README_zh.md b/thirdparty/libosip2/README_zh.md
index 88bf0231ce806ee8f39afa39a6498d8e05ba4228..d72cb0baaf397787cf4603b4f5f186e5d3eb6b72 100644
--- a/thirdparty/libosip2/README_zh.md
+++ b/thirdparty/libosip2/README_zh.md
@@ -1,11 +1,15 @@
# libosip2三方库说明
## 功能简介
libosip2是一个开放源代码的sip协议栈,是开源代码中不多使用C语言写的协议栈之一,它具有短小简洁的特点,专注于sip底层解析使得它的效率比较高.
+
+## 三方库版本
+- 5.3.1
+
+## 已适配功能
+- 支持sip消息的解析和生成、头处理和会话管理等功能
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:5.3.1
-- 当前适配的功能:支持sip消息的解析和生成、头处理和会话管理等功能
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libosip2/docs/hap_integrate.md b/thirdparty/libosip2/docs/hap_integrate.md
index 876d827d7a80e0ffde6ad011cf7e4142f8c91eaf..d60d168268af326a50f1a776faf82e27db3bea37 100644
--- a/thirdparty/libosip2/docs/hap_integrate.md
+++ b/thirdparty/libosip2/docs/hap_integrate.md
@@ -1,12 +1,9 @@
# libosip2集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libpcap/README.OpenSource b/thirdparty/libpcap/README.OpenSource
index dcf3791e05a68a50d367deaae73c9ca2ccf98e16..a82e46d4cfcfbb62d7bcb6c6ba9d353e9b5c5a1e 100644
--- a/thirdparty/libpcap/README.OpenSource
+++ b/thirdparty/libpcap/README.OpenSource
@@ -1,10 +1,10 @@
[
{
"Name": "libpcap",
- "License": "BSD",
- "License File": "notes.txt",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/the-tcpdump-group/libpcap/blob/master/LICENSE",
"Version Number": "libpcap-1.10.3",
- "Owner": "llh_01129@163.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/the-tcpdump-group/libpcap/archive/refs/tags/libpcap-1.10.3.tar.gz",
"Description": "This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring."
}
diff --git a/thirdparty/libpcap/README_zh.md b/thirdparty/libpcap/README_zh.md
index 0e56e72b28734ae91e12cb91d469defc1a421590..271d71a448b31cc20c7ac139b7b3c2eba47765de 100644
--- a/thirdparty/libpcap/README_zh.md
+++ b/thirdparty/libpcap/README_zh.md
@@ -2,11 +2,11 @@
## 功能简介
libpcap是unix/linux平台下的网络数据包捕获函数包,大多数网络监控软件都以它为基础。
+## 三方库版本
+- 1.10.3
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:libpcap-1.10.3
-- 当前适配的功能:支持网络数据包捕获
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libpcap/docs/hap_integrate.md b/thirdparty/libpcap/docs/hap_integrate.md
index c66547ab19fa2f0e59c1a676a5e32634e7638390..b187e8918484cdc91405aad2061cb6ccc8a32348 100644
--- a/thirdparty/libpcap/docs/hap_integrate.md
+++ b/thirdparty/libpcap/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libpcap集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libpng/HPKBUILD b/thirdparty/libpng/HPKBUILD
index 2945160e48ad6100c6761598b356bae91b0f35c9..6f6556cf3147fda686f2a8edf387f33a9f311a72 100644
--- a/thirdparty/libpng/HPKBUILD
+++ b/thirdparty/libpng/HPKBUILD
@@ -41,6 +41,11 @@ prepare() {
build() {
cd $builddir/$ARCH-build
../configure "$@" --host=$host --enable-shared --enable-static > `pwd`/build.log 2>&1
+ # 修改导致测试失败的字符串
+ find . -name Makefile -exec sed -i 's#mawk#awk#' {} +
+ find . -name Makefile -exec sed -i 's#/bin/bash#bash#' {} +
+ find . -name Makefile -exec sed -i 's#/usr/bin/sed#/bin/sed#' {} +
+ find . -name Makefile -exec sed -i 's#/usr/bin/mkdir#mkdir#' {} +
ret=-1
if [ $LYCIUM_BUILD_OS == "CYGWI" ]
then
@@ -76,6 +81,7 @@ package() {
check() {
cd $builddir/$ARCH-build
make pngtest pngunknown pngstest pngvalid pngimage pngcp timepng >> `pwd`/build.log 2>&1
+ sed -i 's#/bin/bash#/bin/env bash#' pngtest pngunknown pngstest pngvalid pngimage pngcp timepng
sed -i '/.*check-TESTS: $(check_PROGRAMS)/c\check-TESTS: #$(check_PROGRAMS)' Makefile
cd $OLDPWD
if [ $ARCH == "armeabi-v7a" ]
diff --git a/thirdparty/libpng/README.OpenSource b/thirdparty/libpng/README.OpenSource
index 1e24263b9c3edfdbee2f0fd2ab645f93f878eeed..1ad958b5c2a55cdb743bb40f0c51e3d9b8377bc4 100644
--- a/thirdparty/libpng/README.OpenSource
+++ b/thirdparty/libpng/README.OpenSource
@@ -1,10 +1,10 @@
[
{
"Name": "libpng",
- "License": "zlib/libpng License",
- "License File": "LICENSE",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
"Version Number": "1.6.39",
- "Owner": "wupingyuan@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
"Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
}
diff --git a/thirdparty/libpng/README_zh.md b/thirdparty/libpng/README_zh.md
index 044aae0c1dc2c81377b33a8271ecca1dfffb5d9d..212f31b307e1133b571826e90588c9e57efaaf5d 100644
--- a/thirdparty/libpng/README_zh.md
+++ b/thirdparty/libpng/README_zh.md
@@ -1,11 +1,12 @@
# libpng三方库说明
## 功能简介
libpng是一款C语言编写的用来读写PNG文件的库。
+
+## 三方库版本
+- 1.6.39
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.6.39
-- 当前适配的功能:处理PNG文件的读写
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libpng/docs/hap_integrate.md b/thirdparty/libpng/docs/hap_integrate.md
index 5519ca6fb5645e5e02549a535ea92bde2db24acb..87f3a70bb60fa77bd02c5f52c40631da22cb8c8f 100644
--- a/thirdparty/libpng/docs/hap_integrate.md
+++ b/thirdparty/libpng/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libpng集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libqrencode/HPKBUILD b/thirdparty/libqrencode/HPKBUILD
index e5cf1634f3c072b1c88c7ceed3a30aa3410ec339..fae287b82dfe57671e019bf2feef25e4a5e84889 100644
--- a/thirdparty/libqrencode/HPKBUILD
+++ b/thirdparty/libqrencode/HPKBUILD
@@ -7,7 +7,7 @@ pkgrel=0
pkgdesc=""
url=""
archs=("armeabi-v7a" "arm64-v8a")
-license=("LGPL-2.1 license")
+license=("LGPL-2.1-only")
depends=("libpng")
makedepends=()
diff --git a/thirdparty/libqrencode/README.OpenSource b/thirdparty/libqrencode/README.OpenSource
index f9bba8c12834a1f61b7f10d02f75866b5c0451dd..c487be09a6061dc5284b3e5e5d1886213849a074 100644
--- a/thirdparty/libqrencode/README.OpenSource
+++ b/thirdparty/libqrencode/README.OpenSource
@@ -1,11 +1,20 @@
[
{
"Name": "libqrencode",
- "License": "LGPL-2.1 license",
- "License File": "LICENSE.txt",
+ "License": "LGPL-2.1-only",
+ "License File": "https://github.com/fukuchi/libqrencode/blob/v4.1.1/COPYING",
"Version Number": "v4.1.1",
- "Owner": "llh_01129@163.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/fukuchi/libqrencode/archive/refs/tags/v4.1.1.tar.gz",
"Description": "Libqrencode is a fast and compact library for encoding data in a QR Code, a 2D symbology that can be scanned by handy terminals such as a smartphone. "
+ },
+ {
+ "Name": "libpng",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
+ "Version Number": "1.6.39",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
}
]
diff --git a/thirdparty/libqrencode/README_zh.md b/thirdparty/libqrencode/README_zh.md
index 5a4b348ab18029a1a7c2b67d3f838182ec3dae14..21e37620496d1de726319c523c27611187265d0e 100644
--- a/thirdparty/libqrencode/README_zh.md
+++ b/thirdparty/libqrencode/README_zh.md
@@ -1,11 +1,12 @@
# libqrencode三方库说明
## 功能简介
Libqrencode是一个快速紧凑的库,用于将数据编码为二维码,二维码是一种二维符号,可以通过智能手机等方便的终端进行扫描。
+
+## 三方库版本
+- v4.1.1
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v4.1.1
-- 将数据编码为二维码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libqrencode/docs/hap_integrate.md b/thirdparty/libqrencode/docs/hap_integrate.md
index b8540db3e9bb800d4b534f4cd2006326c216ba92..53a6d89abafc5f56690c8bd5c478d800b049199d 100644
--- a/thirdparty/libqrencode/docs/hap_integrate.md
+++ b/thirdparty/libqrencode/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libqrencode集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libsrtp/README.OpenSource b/thirdparty/libsrtp/README.OpenSource
index 9230c42198922eaded5a48438e54c0c37a7e96ab..5b632fb187ba9c67e1839bff7350bc775a6b6cc0 100644
--- a/thirdparty/libsrtp/README.OpenSource
+++ b/thirdparty/libsrtp/README.OpenSource
@@ -1,11 +1,29 @@
[
{
"Name": "libsrtp",
- "License": "2001-2017 Cisco Systems, Inc",
- "License File": "notes.txt",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/cisco/libsrtp/blob/main/LICENSE",
"Version Number": "v2.5.0",
- "Owner": "llh_01129@163.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/cisco/libsrtp/archive/refs/tags/v2.5.0.tar.gz",
"Description": "libSRTP provides functions for protecting RTP and RTCP. RTP packets can be encrypted and authenticated (using the srtp_protect() function), turning them into SRTP packets."
+ },
+ {
+ "Name": "openssl",
+ "License": "OpenSSL License and Original SSLeay License",
+ "License File": "https://www.openssl.org/source/license-openssl-ssleay.txt",
+ "Version Number": "1.1.1u",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1u/openssl-1.1.1u.tar.gz",
+ "Description": "OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol."
+ },
+ {
+ "Name": "libpcap",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/the-tcpdump-group/libpcap/blob/master/LICENSE",
+ "Version Number": "libpcap-1.10.3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/the-tcpdump-group/libpcap/archive/refs/tags/libpcap-1.10.3.tar.gz",
+ "Description": "This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring."
}
]
diff --git a/thirdparty/libsrtp/README_zh.md b/thirdparty/libsrtp/README_zh.md
index 70c51dd1e48a1616814ad90d526ac248e6d48bec..6092234c0ee8b85704f67ce02643110e87b8b764 100644
--- a/thirdparty/libsrtp/README_zh.md
+++ b/thirdparty/libsrtp/README_zh.md
@@ -1,11 +1,12 @@
# libsrtp三方库说明
## 功能简介
libSRTP提供了保护RTP和RTCP的功能。RTP数据包可以进行加密和身份验证(使用srtp_protect()函数),将其转换为srtp数据包。
+
+## 三方库版本
+- v2.5.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.5.0
-- 当前适配的功能:支持加密的rtp数据包传输
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libssh2/README_zh.md b/thirdparty/libssh2/README_zh.md
index c78f5b65c63e594976cecad6af7372f2a303c572..8a7f409bcb36fa702f8d02ef4f842fb5d5542ee0 100644
--- a/thirdparty/libssh2/README_zh.md
+++ b/thirdparty/libssh2/README_zh.md
@@ -1,11 +1,12 @@
# libssh2三方库说明
## 功能简介
libssh2是一个实现SSH2协议的库,可以在修订后的BSD许可下使用。
+
+## 三方库版本
+- 1.11.0
+
## 使用约束
-- IDE版本:DevEco Studio 4.1.3 Release
-- SDK版本:ohos_sdk_public 5.0.3.100 (API Version 10 Release)
-- 三方库版本:1.11.0
-- 当前适配的功能:支持向量机
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libsvm/README_zh.md b/thirdparty/libsvm/README_zh.md
index 346bfcb24586f60e389df8059adced0996f2e8d1..e2bc9f6678eeb9b0838961b1b060964f0074721b 100644
--- a/thirdparty/libsvm/README_zh.md
+++ b/thirdparty/libsvm/README_zh.md
@@ -1,11 +1,12 @@
# libsvm三方库说明
## 功能简介
libsvm是一个支持向量机的库。
+
+## 三方库版本
+- v331
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v331
-- 当前适配的功能:支持向量机
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libsvm/docs/hap_integrate.md b/thirdparty/libsvm/docs/hap_integrate.md
index d31325bf2906a815914132d73c64f5a4a17f952f..2e5b66c5aa83b46b7cf14d00e720674515fd7d91 100644
--- a/thirdparty/libsvm/docs/hap_integrate.md
+++ b/thirdparty/libsvm/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libsvm集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libtess2/README_zh.md b/thirdparty/libtess2/README_zh.md
index 66c0a02321202f7235e526cb1e3e63f1241f6d53..f0db4d4e5001208da7d9b16dab4da8b3e28cefe3 100644
--- a/thirdparty/libtess2/README_zh.md
+++ b/thirdparty/libtess2/README_zh.md
@@ -1,11 +1,12 @@
# libtess2三方库说明
## 功能简介
libtess2 可以对复杂多边形进行曲面细分。
+
+## 三方库版本
+- 1.3.1
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.3.1
-- 当前适配的功能:支持对复杂多边形进行曲面细分
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libtess2/docs/hap_integrate.md b/thirdparty/libtess2/docs/hap_integrate.md
index 12ddb6e45bb17d85177b17246d958e737af279b6..18f2a7dd67e479558226d57ca78c8092d8c06577 100644
--- a/thirdparty/libtess2/docs/hap_integrate.md
+++ b/thirdparty/libtess2/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libtiff/HPKBUILD b/thirdparty/libtiff/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..ee95e1e6e54d80bee3b2fdbba15b4a551c3b6f2a
--- /dev/null
+++ b/thirdparty/libtiff/HPKBUILD
@@ -0,0 +1,81 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , wen fan
+# Maintainer: Jeff Han
+
+pkgname=libtiff
+pkgver=51558511bdbbcffdce534db21dbaf5d54b31638a
+pkgrel=
+pkgdesc="a small collection of tools for doingsimple manipulations of TIFF images, and documentation on the library and tools."
+url=https://gitlab.com/libtiff/libtiff
+archs=(armeabi-v7a arm64-v8a)
+license=libtiff
+depends=(zstd_1_5_6 libjpeg-turbo xz libwebp libdeflate jbigkit)
+makedepends=()
+
+source=
+autounpack=false
+downloadpackage=false
+buildtools=cmake
+clonesrcflag=true
+
+builddir=${pkgname}-${pkgver}
+packagename=
+
+prepare() {
+ if ${clonesrcflag}
+ then
+ git clone ${url}.git ${builddir} > ${publicbuildlog} 2>&1 || return -1
+ cd ${builddir}
+ git reset --hard ${pkgver} >> ${publicbuildlog} 2>&1 || return -1
+ cd ${OLDPWD}
+ clonesrcflag=false
+ fi
+
+ mkdir -p ${builddir}/${ARCH}-build
+ return 0
+}
+
+build() {
+ cd ${builddir}
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -B${ARCH}-build -S./ > ${buildlog} 2>&1 || return -1
+ ${MAKE} -C${ARCH}-build >> ${buildlog} 2>&1 || return -1
+ cd ${OLDPWD}
+ return 0
+}
+
+package() {
+ cd ${builddir}/${ARCH}-build
+ ${MAKE} install >> ${buildlog} 2>&1 || return -1
+ cd ${OLDPWD}
+ return 0
+}
+
+check() {
+ cd ${builddir}/${ARCH}-build
+
+ # 使用单板cmake程序进行测试
+ find . -name "CTestTestfile.cmake" | xargs sed -i.bak 's#".*/cmake"#"/bin/cmake"#g' || return -1
+
+ # 将测试用例使用的cmake改为CI工具的cmake
+ sed -i.bak "s/\".*\/cmake\"/\"cmake\"/g" test/CTestTestfile.cmake || return -1
+ cd ${OLDPWD}
+ echo "The test must be on an OpenHarmony device!"
+ return 0
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/${builddir}
+ return 0
+}
diff --git a/thirdparty/libtiff/HPKCHECK b/thirdparty/libtiff/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..4b27802c8b97145df735ea91d8b8e96810c88342
--- /dev/null
+++ b/thirdparty/libtiff/HPKCHECK
@@ -0,0 +1,36 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , wen fan
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare() {
+ return 0
+}
+
+openharmonycheck() {
+ cd ${builddir}/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ ret=$?
+ if [ ${ret} -ne 0 ]
+ then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ fi
+
+ cd ${OLDPWD}
+ return ${ret}
+}
diff --git a/thirdparty/libtiff/OAT.xml b/thirdparty/libtiff/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8c1f4a4604b0605aff883a046d2397e0016221b5
--- /dev/null
+++ b/thirdparty/libtiff/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/thirdparty/libtiff/README.OpenSource b/thirdparty/libtiff/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..41aa8815ec28b97308eaf269bb5398e294ff8e35
--- /dev/null
+++ b/thirdparty/libtiff/README.OpenSource
@@ -0,0 +1,66 @@
+[
+ {
+ "Name": "libtiff",
+ "License": "libtiff",
+ "License File": "https://gitlab.com/libtiff/libtiff/-/blob/master/LICENSE.md",
+ "Version Number": "51558511bdbbcffdce534db21dbaf5d54b31638a",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://gitlab.com/libtiff/libtiff",
+ "Description": "a small collection of tools for doingsimple manipulations of TIFF images, and documentation on the library and tools."
+ },
+ {
+ "Name": "zstd",
+ "License": "BSD-3-Clause or GPL-2.0-only",
+ "License File": ["https://github.com/facebook/zstd/blob/dev/LICENSE","https://github.com/facebook/zstd/blob/dev/COPYING"],
+ "Version Number": "v1.5.4",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/facebook/zstd/releases/download/v1.5.4/zstd-1.5.4.tar.gz",
+ "Description": "Zstandard, or zstd as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios."
+ },
+ {
+ "Name": "libjpeg-turbo",
+ "License": "IJG and BSD-3-clause",
+ "License File": ["https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/README.ijg","https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md"],
+ "Version Number": "2.1.91",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.1.91.tar.gz",
+ "Description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression"
+ },
+ {
+ "Name": "xz",
+ "License": "Public Domain and LGPL-2.1 and GPL-2.0 and GPL-3.0",
+ "License File": ["https://github.com/tukaani-project/xz/blob/v5.4/COPYING","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv2",
+ "https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv3","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.LGPLv2.1"],
+ "Version Number": "5.4.1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/tukaani-project/xz/releases/download/v5.4.1/xz-5.4.1.tar.gz",
+ "Description": "XZ Utils is free general-purpose data compression software with a high compression ratio. "
+ },
+ {
+ "Name": "libwebp",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/webmproject/libwebp/blob/main/COPYING",
+ "Version Number": "1.3.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/webmproject/libwebp/archive/refs/tags/v1.3.0.tar.gz",
+ "Description": "WebP codec is a library to encode and decode images in WebP format. This package contains the library that can be used in other programs to add WebP support, as well as the command line tools 'cwebp' and 'dwebp' to compress and decompress images respectively."
+ },
+ {
+ "Name": "libdeflate",
+ "License": "MIT",
+ "License File": "https://github.com/ebiggers/libdeflate/blob/master/COPYING",
+ "Version Number": "v1.17",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.17.tar.gz",
+ "Description": "libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression."
+ },
+ {
+ "Name": "jbigkit",
+ "License": "GPL-2.0-only",
+ "License File": "COPYING",
+ "Version Number": "2.1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://www.cl.cam.ac.uk/~mgk25/$pkgname/download/jbigkit-2.1.tar.gz",
+ "Description": "JBIG-KIT is a software implementation of the JBIG1 data compression standard (ITU-T T.82), which was designed for bi-level image data, such as scanned documents."
+ }
+]
diff --git a/thirdparty/libtiff/README_zh.md b/thirdparty/libtiff/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..58cf3140bac5a031673b937e14767b89975dc24a
--- /dev/null
+++ b/thirdparty/libtiff/README_zh.md
@@ -0,0 +1,25 @@
+# libtiff三方库说明
+## 功能简介
+libtiff是一个用来读写标签图片(tiff)的库。该库还支持如下文件格式的转化。
+
+## 三方库版本
+- 51558511bdbbcffdce534db21dbaf5d54b31638a
+
+## 已适配功能
+- 支持如下格式转换
+
+ | 源文件格式 | 转化后格式 |
+ | :--------: | :--------: |
+ | tiff | tiff |
+ | pgm | tiff |
+ | g3 | tiff |
+ | pbm | tiff |
+ | ppm | tiff |
+ | tiff | pdf |
+ | tiff | ps |
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [系统hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libtiff/docs/hap_integrate.md b/thirdparty/libtiff/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..661b28d6f07f52ea7991f1b43031511acc3cf021
--- /dev/null
+++ b/thirdparty/libtiff/docs/hap_integrate.md
@@ -0,0 +1,109 @@
+# libtiff集成到应用hap
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+## 开发环境
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+- 下载本仓库
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+ ```
+ tpc_c_cplusplus/thirdparty/libtiff #三方库的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ├── OAT.xml #扫描结果文件
+ ```
+
+- 编译三方库
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libtiff
+ ```
+
+- 三方库头文件及生成的库
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```te
+ libtiff/arm64-v8a libtiff/armeabi-v7a libpng/arm64-v8a libpng/armeabi-v7a
+ libjpeg-turbo/arm64-v8a libjpeg-turbo/armeabi-v7a libwebp/arm64-v8a libwebp/armeabi-v7a
+ zstd/arm64-v8a zstd/armeabi-v7a xz/arm64-v8a xz/armeabi-v7a
+ libdeflate/arm64-v8a libdeflate/armeabi-v7a jbigkit/arm64-v8a jbigkit/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+- 拷贝动态库到`\\entry\libs\${OHOS_ARCH}\`目录:
+ 动态库需要在`\\entry\libs\${OHOS_ARCH}\`目录,才能集成到hap包中,所以需要将编译生成的所有库的so文件拷贝到对应的目录
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的库拷贝到该目录下,如下图所示
+ 
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libtiff.so.6
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libdeflate.so.0
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libjpeg.so.62
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liblzma.so.5
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libzstd.so.1
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libwebp.so.7)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtiff/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/jbigkit/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libdeflate/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libjpeg-turbo/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwebp/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zstd/${OHOS_ARCH}/include)
+ ```
+## 测试三方库
+三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+
+- 设置MAKE执行程序路径
+ ```shell
+ mkdir -p /data/local/tmp/ohos-sdk/linux/native/build-lycium/cmake
+ ln -s /usr/bin /data/local/tmp/ohos-sdk/linux/native/build-lycium/cmake/bin
+ ```
+- 拷贝CMAKE安装路径到单板
+ ```shell
+ # 将编译机的/usr/share 目录下面cmake-3.26.X 进行压缩并传送到单板
+ hdc.exe file send Z:\code\cmake-3.26.3.tar.gz /data/
+ mv /data/cmake-3.26.3.tar.gz /usr/share
+ tar zxvf cmake-3.26.3.tar.gz
+ mv cmake-3.26.3 cmake-3.26
+ ```
+- 将测试资源导入到开发板
+- 设置依赖库路径
+```shell
+# 32位系统
+export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/libjpeg-turbo/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libdeflate/armeabi-v7a/lib:/data/local/tmp/lycium/usr/xz/armeabi-v7a/lib:/data/local/tmp/lycium/usr/zstd/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libpng/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libtiff/armeabi-v7a/lib:/data/local/tmp/lycium/usr/libwebp/armeabi-v7a/lib:/data/local/tmp/lycium/usr/jbigkit/armeabi-v7a/lib
+
+# 64位系统
+export LD_LIBRARY_PATH=/data/local/tmp/lycium/usr/libjpeg-turbo/arm64-v8a/lib:/data/local/tmp/lycium/usr/libdeflate/arm64-v8a/lib:/data/local/tmp/lycium/usr/xz/arm64-v8a/lib:/data/local/tmp/lycium/usr/zstd/arm64-v8a/lib:/data/local/tmp/lycium/usr/libpng/arm64-v8a/lib:/data/local/tmp/lycium/usr/libtiff/arm64-v8a/lib:/data/local/tmp/lycium/usr/libwebp/arm64-v8a/lib:/data/local/tmp/lycium/usr/jbigkit/arm64-v8a/lib
+```
+- 进入到构建目录输入以下指令
+```shell
+find . -name "CTestTestfile.cmake" | xargs sed -i 's#".*/cmake"#"/usr/bin/cmake"#g'
+```
+- 进入到构建目录执行 ctest 运行测试用例,如下截图(arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)
+
+```shell
+ctest
+```
+
+ 
+
+## 参考资料
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md)
diff --git a/thirdparty/libtiff/docs/pic/tiff_install.png b/thirdparty/libtiff/docs/pic/tiff_install.png
new file mode 100644
index 0000000000000000000000000000000000000000..a9c2f8616fb9539112d4182d5a1c1347bf2a17a5
Binary files /dev/null and b/thirdparty/libtiff/docs/pic/tiff_install.png differ
diff --git a/thirdparty/libtiff/docs/pic/tiff_ohos_test2.png b/thirdparty/libtiff/docs/pic/tiff_ohos_test2.png
new file mode 100644
index 0000000000000000000000000000000000000000..491875ea13b8fdc74ffa3d871f41163ae7f2e273
Binary files /dev/null and b/thirdparty/libtiff/docs/pic/tiff_ohos_test2.png differ
diff --git a/thirdparty/libtomcrypt/HPKBUILD b/thirdparty/libtomcrypt/HPKBUILD
index e2d21c3e6537624ccbac1f893f77a3f83b4fa021..fffba87d058f19a73a39a3cd74995f7ffc0c6ca4 100644
--- a/thirdparty/libtomcrypt/HPKBUILD
+++ b/thirdparty/libtomcrypt/HPKBUILD
@@ -15,16 +15,16 @@
# Maintainer: Jeff Han
pkgname=libtomcrypt
-pkgver=1.18.2
+pkgver=2302a3a89752b317d59e9cdb67d2d4eb9b53be8e
pkgrel=0
pkgdesc="libtomcrypt is a modular, portable, free and open source cryptographic library that provides implementations of various cryptographic algorithms, including symmetric cryptographic algorithms (e.g. AES, DES), public key cryptographic algorithms (e.g. RSA, ECC), hash algorithms (e.g. SHA-256, MD5), etc."
url="https://github.com/libtom/libtomcrypt"
archs=("armeabi-v7a" "arm64-v8a")
-license=("DUAL licensing terms")
+license=(Unlicense)
depends=("libtommath")
makedepends=()
-source="https://github.com/libtom/$pkgname/archive/refs/tags/v$pkgver.zip"
+source=https://github.com/libtom/${pkgname}/archive/${pkgver}.zip
autounpack=true
downloadpackage=true
@@ -34,7 +34,6 @@ builddir=$pkgname-${pkgver}
packagename=$builddir.zip
source envset.sh
-patchflag=true
# libtomcrypt 采用makefile编译构建,为了保留构建环境(方便测试)。因此同一份源码在解压后分为两份,各自编译互不干扰
prepare() {
diff --git a/thirdparty/libtomcrypt/README.OpenSource b/thirdparty/libtomcrypt/README.OpenSource
index a84ba89b29e4a31c386e20a62010ee171f59deb8..20bc56892abe28a5a9e677b8c33b1c8abb3a0679 100644
--- a/thirdparty/libtomcrypt/README.OpenSource
+++ b/thirdparty/libtomcrypt/README.OpenSource
@@ -1,9 +1,9 @@
[
{
"Name": "libtomcrypt",
- "License": "DUAL licensing terms",
- "License File": "LICENSE",
- "Version Number": "v1.18.2",
+ "License": "Unlicense",
+ "License File": "https://github.com/libtom/libtomcrypt/blob/develop/LICENSE",
+ "Version Number": "2302a3a89752b317d59e9cdb67d2d4eb9b53be8e",
"Owner": "huangminzhong2@huawei.com",
"Upstream URL": "https://github.com/libtom/libtomcrypt",
"Description": "libtomcrypt is a modular, portable, free and open source cryptographic library that provides implementations of various cryptographic algorithms, including symmetric cryptographic algorithms (e.g. AES, DES), public key cryptographic algorithms (e.g. RSA, ECC), hash algorithms (e.g. SHA-256, MD5), etc."
@@ -11,7 +11,7 @@
{
"Name": "libtommath",
"License": "public domain",
- "License File": "LICENSE",
+ "License File": "https://github.com/libtom/libtommath/blob/develop/LICENSE",
"Version Number": "1.2.0",
"Owner": "wupingyuan@huawei.com",
"Upstream URL": "https://github.com/libtom/libtommath/archive/refs/tags/v1.2.0.tar.gz",
diff --git a/thirdparty/libtomcrypt/README_zh.md b/thirdparty/libtomcrypt/README_zh.md
index e30057d878ed41fe49c960094aeed88079421c46..fcfdc669b8a7caa6aa016cad026dcd3b0fd40f0e 100644
--- a/thirdparty/libtomcrypt/README_zh.md
+++ b/thirdparty/libtomcrypt/README_zh.md
@@ -1,10 +1,12 @@
# libtomcrypt 三方库说明
## 功能简介
libtomcrypt 是一个模块化的、可移植的、免费的开源加密库,它提供了各种加密算法的实现,包括对称加密算法(如 AES、DES)、公钥加密算法(如 RSA、ECC)、哈希算法(如 SHA-256、MD5)等。
+
+## 三方库版本
+- 2302a3a89752b317d59e9cdb67d2d4eb9b53be8e
+
## 使用约束
-- IDE版本:DevEco Studio 4.1 Release
-- SDK版本:sdk-linux-5.0.3.100
-- 三方库版本:libtomcrypt-v1.18.2
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libtomcrypt/SHA512SUM b/thirdparty/libtomcrypt/SHA512SUM
index e25ecc4e1bddfd7607de2ea0c03193fdc1de2757..65770954ea08fa9541da70e402416a08504a6849 100644
--- a/thirdparty/libtomcrypt/SHA512SUM
+++ b/thirdparty/libtomcrypt/SHA512SUM
@@ -1 +1 @@
-2e73bee2865301a74eb1404c1a920cad7e90a08650de08bd9d8f2ecf228a8b3233178b7022f9dccbd1274ff14722eb5e4f8b9004f695e9620041ca672b0a3029 libtomcrypt-1.18.2.zip
+12f36ce000cbd95eb7c83d7bc3b0297ec90d61b8dcc907f854ed3008252adc43681e7baa6e67528e245a772ba238c2f14bd1be8ca7be81135afa39832fa930f3 libtomcrypt-2302a3a89752b317d59e9cdb67d2d4eb9b53be8e.zip
diff --git a/thirdparty/libtommath/README_zh.md b/thirdparty/libtommath/README_zh.md
index 7e61e7cd05642e7b36f3c236d219b4ddd4e3bbb9..a99915eea57d807c13c46f7c999a91e6b2b99dd7 100644
--- a/thirdparty/libtommath/README_zh.md
+++ b/thirdparty/libtommath/README_zh.md
@@ -1,11 +1,12 @@
# libtommath三方库说明
## 功能简介
libtommath是一个完全用C语言编写的免费开源可移植数字理论多精度整数(MPI)库。
+
+## 三方库版本
+- 1.2.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.2.0
-- 当前适配的功能:数字理论多精度整数
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libtommath/docs/hap_integrate.md b/thirdparty/libtommath/docs/hap_integrate.md
index 7044be3a6aaff14276225d0759f90cdab94209d9..627c474b359158c863f00ca382d4364a4302d650 100644
--- a/thirdparty/libtommath/docs/hap_integrate.md
+++ b/thirdparty/libtommath/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libtommath集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libtool/README.OpenSource b/thirdparty/libtool/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..00c266483b38110fba92f1f245f10da50ce9406c
--- /dev/null
+++ b/thirdparty/libtool/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libtool",
+ "License": "GPL-2.0",
+ "License File": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
+ "Version Number": "2.4.6",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz",
+ "Description": "GNU Libtool is a generic library support script that hides the complexity of using shared libraries behind a consistent, portable interface."
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/libtorrent/HPKBUILD b/thirdparty/libtorrent/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..8c7e31f844af2d09ea370a3a451fc23eabd2301a
--- /dev/null
+++ b/thirdparty/libtorrent/HPKBUILD
@@ -0,0 +1,87 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: baijn <1225837220@qq.com>
+# Maintainer: baijn <1225837220@qq.com>
+
+pkgname=libtorrent
+pkgver=v2.0.10
+pkgrel=0
+pkgdesc="libtorrent is an open source C++ library implementing the BitTorrent protocol, along with most popular extensions, making it suitable for real world deployment. It is configurable to be able to fit both servers and embedded devices."
+url="https://github.com/arvidn/libtorrent"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("BSD-3-Clause")
+depends=("boost")
+makedepends=()
+source="https://github.com/arvidn/$pkgname.git"
+commitid=74bc93a37a5e31c78f0aa02037a68fb9ac5deb41
+
+downloadpackage=false
+autounpack=false
+buildtools="cmake"
+builddir=$pkgname-${pkgver:1}
+packagename=
+cloneflag=true
+
+prepare() {
+ if $cloneflag
+ then
+ git clone --recurse-submodules $source $builddir > $publicbuildlog 2>&1
+ if [ $? -ne 0 ]
+ then
+ return -1
+ fi
+ cd $builddir
+ git reset --hard $commitid >> $publicbuildlog 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -2
+ fi
+ #test_copy_file测试用例中:1.添加鸿蒙对应的文件系统块魔数;2.预编译时添加文件系统稀疏文件偏移量的宏定义;
+ #CMakeLists中:有16个测试用例涉及python脚本的调用,目前鸿蒙系统不支持,故屏蔽
+ patch -p1 < `pwd`/../libtorrent_oh_pkg.patch >> $publicbuildlog 2>&1
+ cd $OLDPWD
+ cloneflag=false
+ fi
+
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \
+ -DBUILD_SHARED_LIBS=OFF \
+ -Dbuild_tests=ON \
+ -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir #${PWD}/$packagename
+}
diff --git a/thirdparty/libtorrent/HPKCHECK b/thirdparty/libtorrent/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..574f1c9b34603d11c34627166d85d6f001c443c6
--- /dev/null
+++ b/thirdparty/libtorrent/HPKCHECK
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: baijn <1225837220@qq.com>
+# Maintainer: baijn <1225837220@qq.com>
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ cd $builddir/${ARCH}-build
+ ctest > $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ cd $OLDPWD
+ return $res
+ fi
+
+ cd $OLDPWD
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/libtorrent/OAT.xml b/thirdparty/libtorrent/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..03ee5a760a1f17e2e86907647046114696ade760
--- /dev/null
+++ b/thirdparty/libtorrent/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libtorrent/README.OpenSource b/thirdparty/libtorrent/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..f999943a5143b2230502740c7494ecd6084fb008
--- /dev/null
+++ b/thirdparty/libtorrent/README.OpenSource
@@ -0,0 +1,20 @@
+[
+ {
+ "Name": "libtorrent",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/arvidn/libtorrent/blob/RC_2_0/LICENSE",
+ "Version Number": "v2.0.10",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/arvidn/libtorrent/archive/refs/tags/v2.0.10.tar.gz",
+ "Description": "libtorrent is an open source C++ library implementing the BitTorrent protocol, along with most popular extensions, making it suitable for real world deployment. It is configurable to be able to fit both servers and embedded devices."
+ },
+ {
+ "Name": "boost",
+ "License": "Boost Software License",
+ "License File": "https://www.boost.org/LICENSE_1_0.txt",
+ "Version Number": "1.81.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz",
+ "Description": "Boost provides free peer-reviewed portable C++ source libraries."
+ }
+]
diff --git a/thirdparty/libtorrent/README_zh.md b/thirdparty/libtorrent/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..b5a39cba597c6c2832e156a1531b0eec6e241fde
--- /dev/null
+++ b/thirdparty/libtorrent/README_zh.md
@@ -0,0 +1,12 @@
+# libtorrent三方库说明
+## 功能简介
+libtorrent 是一个用于 BitTorrent 协议的高性能、跨平台的 C++ 库,用于文件共享的对等网络协议,允许用户从多个来源同时下载文件,从而实现快速和高效的文件分发。
+
+## 三方库版本
+- v2.0.10
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
\ No newline at end of file
diff --git a/thirdparty/libtorrent/SHA512SUM b/thirdparty/libtorrent/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..a4e829caebc1daf079ed852be9fc00da450cbdcc
--- /dev/null
+++ b/thirdparty/libtorrent/SHA512SUM
@@ -0,0 +1 @@
+3041a62c3eae3500f6c95246ab522ff06e6f659c33a7bfab58342ae86a408956db5d7a709258fa3e43733c41111c820c01937bb1050ec2347a56d9feababc76e libtorrent.tar.gz
diff --git a/thirdparty/libtorrent/docs/hap_integrate.md b/thirdparty/libtorrent/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..75861f0760c7600e18af656860f40b4bbf297f00
--- /dev/null
+++ b/thirdparty/libtorrent/docs/hap_integrate.md
@@ -0,0 +1,63 @@
+# libtorrent集成到应用hap
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+## 开发环境
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+## 编译三方库
+- 下载本仓库
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+- 三方库目录结构
+ ```shell
+ tpc_c_cplusplus/thirdparty/libtorrent #三方库libtorrent的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ├── libtorrent_oh_pkg.patch #用于libtorrent库编译的补丁文件
+ ```
+- 在lycium目录下编译三方库
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+ ```shell
+ cd lycium
+ ./build.sh libtorrent
+ ```
+- 三方库头文件及生成的库
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libtorrent/arm64-v8a libtorrent/armeabi-v7a
+ ```
+- [测试三方库](#测试三方库)
+## 应用中使用三方库
+- 在IDE的cpp目录下新增thirdparty目录将三方库及其依赖库的头文件和二进制文件拷贝到该目录下
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句:
+ ```cmake
+ #将三方静态库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtorrent/${OHOS_ARCH}/lib/libtorrent-rasterbar.a)
+ #将三方库头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libtorrent/${OHOS_ARCH}/include)
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/boost/${OHOS_ARCH}/include)
+ ```
+## 测试三方库
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- 进入到构建目录执行测试用例(注意arm64-v8a-build为构建64位的目录,armeabi-v7a-build为构建32位的目录)
+ ```
+ 添加路径export LD_LIBRARY_PATH="/data/tpc_c_cplusplus/lycium/usr/libtorrent/arm64-v8a-build/lib/"
+ cd data/tpc_c_cplusplus/thirdparty/libtorrent/libtorrent-2.0.10/arm64-v8a-build
+ 执行指令ctest
+ ```
+- 测试结果如图所示:
+
+ 
+
+## 参考资料
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [libtorrent三方库地址](https://github.com/arvidn/libtorrent)
\ No newline at end of file
diff --git a/thirdparty/libtorrent/docs/pic/libtorrent_install.PNG b/thirdparty/libtorrent/docs/pic/libtorrent_install.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..4331c22ce454d4ae9463339b4c833e3d727202f4
Binary files /dev/null and b/thirdparty/libtorrent/docs/pic/libtorrent_install.PNG differ
diff --git a/thirdparty/libtorrent/docs/pic/libtorrent_tests.png b/thirdparty/libtorrent/docs/pic/libtorrent_tests.png
new file mode 100644
index 0000000000000000000000000000000000000000..679e3ac936ff500702907907b8c15df72e67957f
Binary files /dev/null and b/thirdparty/libtorrent/docs/pic/libtorrent_tests.png differ
diff --git a/thirdparty/libtorrent/libtorrent_oh_pkg.patch b/thirdparty/libtorrent/libtorrent_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..5e581de3834aab81205908fcdb2640ad986d22e2
--- /dev/null
+++ b/thirdparty/libtorrent/libtorrent_oh_pkg.patch
@@ -0,0 +1,54 @@
+diff -Naur old/src/copy_file.cpp new/src/copy_file.cpp
+--- old/src/copy_file.cpp 2024-07-11 18:30:26.862570692 +0800
++++ new/src/copy_file.cpp 2024-07-11 18:30:26.870570585 +0800
+@@ -36,6 +36,9 @@
+ #include "libtorrent/aux_/path.hpp"
+ #include "libtorrent/aux_/storage_utils.hpp"
+
++#define SEEK_DATA 3
++#define SEEK_HOLE 4
++
+ #ifdef TORRENT_WINDOWS
+ // windows part
+ #include "libtorrent/aux_/windows.hpp"
+diff -Naur old/test/CMakeLists.txt new/test/CMakeLists.txt
+--- old/test/CMakeLists.txt 2024-07-15 11:17:32.456613079 +0800
++++ new/test/CMakeLists.txt 2024-07-15 11:18:25.068486575 +0800
+@@ -11,6 +11,22 @@
+ file(GLOB tests "${CMAKE_CURRENT_SOURCE_DIR}/test_*.cpp")
+ list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_natpmp.cpp") # doesn't build at time of writing
+ list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_utils.cpp") # helper file, not a test
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_http_connection.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_privacy.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_tracker.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_transfer.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_upnp.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_url_seed.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_ban.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_chunked.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_http.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_http_pw.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_redirect.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_socks4.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_socks5.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_socks5_no_peers.cpp")
++list(REMOVE_ITEM tests "${CMAKE_CURRENT_SOURCE_DIR}/test_web_seed_socks5_pw.cpp")
+
+ add_library(test_common
+ STATIC
+diff -Naur old/test/test_copy_file.cpp new/test/test_copy_file.cpp
+--- old/test/test_copy_file.cpp 2024-07-11 18:30:26.850570853 +0800
++++ new/test/test_copy_file.cpp 2024-07-12 12:59:04.495704426 +0800
+@@ -118,9 +118,10 @@
+ #ifdef TORRENT_LINUX
+ using fsword_t = decltype(statfs::f_type);
+ static fsword_t const ufs = 0x00011954;
++ static fsword_t const ohos_filesystem = 0xf2f52010;
+ static const std::set sparse_filesystems{
+ EXT4_SUPER_MAGIC, EXT3_SUPER_MAGIC, XFS_SUPER_MAGIC, fsword_t(BTRFS_SUPER_MAGIC)
+- , ufs, REISERFS_SUPER_MAGIC, TMPFS_MAGIC
++ , ufs, REISERFS_SUPER_MAGIC, TMPFS_MAGIC, ohos_filesystem
+ };
+ printf("filesystem: %ld\n", long(st.f_type));
+ return sparse_filesystems.count(st.f_type);
diff --git a/thirdparty/libucl/HPKBUILD b/thirdparty/libucl/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..2730c124d98d021a16878a1becf1afd71041e59b
--- /dev/null
+++ b/thirdparty/libucl/HPKBUILD
@@ -0,0 +1,64 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com>, wangying
+# Maintainer: wangyihao<2471389@stu.neu.edu.cn>, wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+pkgname=libucl
+pkgver=0.8.2
+pkgrel=0
+pkgdesc="UCL is an universal configuration library parser,it is compatible with JSON language and therefore can be used as a simple JSON parser."
+url="https://github.com/vstakhov/libucl/tree/0.8.2"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("BSD 2-Clause License")
+depends=()
+makedepends=()
+source="https://github.com/vstakhov/libucl/archive/refs/tags/0.8.2.zip"
+
+downloadpackage=true
+autounpack=true
+buildtools=cmake
+
+builddir=$pkgname-${pkgver}
+packagename=$builddir.zip
+
+# 为编译设置环境,如设置环境变量,创建编译目录等
+prepare() {
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument" \
+ -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir
+}
diff --git a/thirdparty/libucl/HPKCHECK b/thirdparty/libucl/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..bf95de7c03daefcd029bdb515396ad016cb9b19a
--- /dev/null
+++ b/thirdparty/libucl/HPKCHECK
@@ -0,0 +1,33 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2471389@stu.neu.edu.cn>, wangying
+# Maintainer: wangyihao<2471389@stu.neu.edu.cn>, wangjialun<2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare(){
+ return 0
+}
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ res=0 # 记录返回值
+ cd ${builddir}/${ARCH}-build # 进入到测试目录
+ ctest > ${logfile} 2>&1 # 执行测试命令并将测试结果导出到${logfile},测试命令根据每个库的真实情况填写
+ res=$? # 记录测试结果返回值
+ cd $OLDPWD # 返回上一次目录
+
+ return $res # 返回测试值
+}
\ No newline at end of file
diff --git a/thirdparty/libucl/OAT.xml b/thirdparty/libucl/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/libucl/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/libucl/README.OpenSource b/thirdparty/libucl/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..930e57edf4b2c743fd527120b86be806f25f23eb
--- /dev/null
+++ b/thirdparty/libucl/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libucl",
+ "License": "BSD 2-Clause License",
+ "License File": "https://github.com/vstakhov/libucl/blob/master/COPYING",
+ "Version Number": "0.8.2",
+ "Owner": "2942375747@qq.com",
+ "Upstream URL": "https://github.com/vstakhov/libucl",
+ "Description": "UCL is an universal configuration library parser,it is compatible with JSON language and therefore can be used as a simple JSON parser."
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/libucl/README_zh.md b/thirdparty/libucl/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..261f6a5649dbc01b16a1a24e0cb6bb4cb33a1938
--- /dev/null
+++ b/thirdparty/libucl/README_zh.md
@@ -0,0 +1,12 @@
+# libucl三方库说明
+## 功能简介
+libucl是一种通用的配置库解析器,它与JSON语言兼容,因此可以用作简单的JSON解析器。
+
+## 三方库版本
+- 0.8.2
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libucl/SHA512SUM b/thirdparty/libucl/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..0baae4d641fe142924bc39b633200797add49b13
--- /dev/null
+++ b/thirdparty/libucl/SHA512SUM
@@ -0,0 +1 @@
+a9d0104b6457bd4659507d4cf980921ccc42967ce5231126c2f6b556affcbee11eb9d4a33dbe489d8362a416f897b9d3214144688131bd00ff5851fc60978ddc libucl-0.8.2.zip
\ No newline at end of file
diff --git a/thirdparty/libucl/docs/hap_integrate.md b/thirdparty/libucl/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..1cd578b3e057bdd30a87b2cb3d3b1589d9f2914f
--- /dev/null
+++ b/thirdparty/libucl/docs/hap_integrate.md
@@ -0,0 +1,79 @@
+# libucl 集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libucl #三方库libucl的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+- 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libucl-0.8.2
+ ```
+
+- 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libucl-0.8.2/arm64-v8a libucl-0.8.2/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部(动态库名字带版本号和不带版本号的都需要)拷贝到工程的libs目录下,如下图所示:
+
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```shell
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libucl/${OHOS_ARCH}/lib/libucl.a)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libucl/${OHOS_ARCH}/include)
+ ```
+
+## 测试三方库
+在lycium目录下执行脚本./test.sh,自动检测thridparty目录下已编译的三方库,
+
+
+```shell
+ cd lycium
+ ./test.sh libucl-0.8.2
+```
+ 
+
+## 参考资料
+
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
\ No newline at end of file
diff --git a/thirdparty/libucl/docs/pic/libucl_install_dir.png b/thirdparty/libucl/docs/pic/libucl_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..436ef8566348a51abd7f764778f866a062e3f674
Binary files /dev/null and b/thirdparty/libucl/docs/pic/libucl_install_dir.png differ
diff --git a/thirdparty/libucl/docs/pic/libucl_test.png b/thirdparty/libucl/docs/pic/libucl_test.png
new file mode 100644
index 0000000000000000000000000000000000000000..0243389ef0d5c47276fb7f33c1a34d2280473107
Binary files /dev/null and b/thirdparty/libucl/docs/pic/libucl_test.png differ
diff --git a/thirdparty/libunibreak/README_zh.md b/thirdparty/libunibreak/README_zh.md
index 0ea9d408f22cee89141691418acde379b0d1be5e..d38ab324109e2854f7bbf4e6d3df9922bc3a315c 100644
--- a/thirdparty/libunibreak/README_zh.md
+++ b/thirdparty/libunibreak/README_zh.md
@@ -1,11 +1,15 @@
# libunibreak 三方库说明
## 功能简介
libunibreak是一个文本处理器。
+
+## 三方库版本
+- libunibreak_5_1
+
+## 已适配功能
+- Libunibreak 是Unicode 标准附件 14和Unicode 标准附件 29中描述的换行和分词算法的实现。它旨在用于通用文本渲染器。
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:libunibreak_5_1
-- 当前适配的功能:Libunibreak 是Unicode 标准附件 14和Unicode 标准附件 29中描述的换行和分词算法的实现。它旨在用于通用文本渲染器。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libunibreak/docs/hap_integrate.md b/thirdparty/libunibreak/docs/hap_integrate.md
index fdefe02dc7be2e915f9499bde80612158b5abebd..8e19830cbbbf7cb64ba6c00d696cf76f7741db0f 100644
--- a/thirdparty/libunibreak/docs/hap_integrate.md
+++ b/thirdparty/libunibreak/docs/hap_integrate.md
@@ -3,12 +3,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libuuid/README_zh.md b/thirdparty/libuuid/README_zh.md
index 7eca62a81a822c10dccf4efd118feee9c1b6b0f6..08984299d8fb6bed241a70ec307edeed8c51e2c5 100644
--- a/thirdparty/libuuid/README_zh.md
+++ b/thirdparty/libuuid/README_zh.md
@@ -1,11 +1,15 @@
# libuuid三方库说明
## 功能简介
The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system.
+
+## 三方库版本
+- 1.0.3
+
+## 已适配功能
+- 生成唯一识别码
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.0.3
-- 当前适配的功能:生成唯一识别码
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libuuid/docs/hap_integrate.md b/thirdparty/libuuid/docs/hap_integrate.md
index 7339147e89e5c75253f5db4f03c2456e1dc122b6..5954aa7437f991ab913f1864d2c97c1e1bff4eb4 100755
--- a/thirdparty/libuuid/docs/hap_integrate.md
+++ b/thirdparty/libuuid/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libuuid集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libvips/README_zh.md b/thirdparty/libvips/README_zh.md
index 84322506a9620696c8fb1d51cbdf739ce52561c7..c4d2c702995b6ad282beb759e8b68bf0fe9e5190 100755
--- a/thirdparty/libvips/README_zh.md
+++ b/thirdparty/libvips/README_zh.md
@@ -1,11 +1,16 @@
# libvips 三方库说明
## 功能简介
libvips 是一个需求驱动的水平线程图像处理库。
+
+## 三方库版本
+- v8.14.5
+
+## 已适配功能
+- 涵盖算术、直方图、卷积、形态操作、频率过滤、颜色等操作,支持多种图像格式,包括JPEG,,TIFF,PNG等。
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v8.14.5
-- 当前适配的功能:涵盖算术、直方图、卷积、形态操作、频率过滤、颜色等操作,支持多种图像格式,包括JPEG,,TIFF,PNG等。
+- [IDE和SDK版本](../../docs/constraint.md)
+
## 集成方式
- [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libvpx/README_zh.md b/thirdparty/libvpx/README_zh.md
index ad3e68673fb6012720e8bde1208ae7f72cf42dc0..adf20ca9ae4110f3287ba1c55805d998ecc33f60 100755
--- a/thirdparty/libvpx/README_zh.md
+++ b/thirdparty/libvpx/README_zh.md
@@ -1,11 +1,12 @@
# libvpx三方库说明
## 功能简介
libvpx是支持vp8、vp9编码解码的开源软件
+
+## 三方库版本
+- 1.13.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.13.0
-- 当前适配的功能: libvpx是谷歌发布的支持vp8、vp9编码解码的开源软件
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libvpx/docs/hap_integrate.md b/thirdparty/libvpx/docs/hap_integrate.md
index f85f8a5d947b2276e2a0672e15104211997c9c30..504f296151ca115d968c25be5c33e4f226846f06 100755
--- a/thirdparty/libvpx/docs/hap_integrate.md
+++ b/thirdparty/libvpx/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/libwbxml/HPKBUILD b/thirdparty/libwbxml/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..9b36f157a3b9a0827f6a910bf7b824e186b7f6cd
--- /dev/null
+++ b/thirdparty/libwbxml/HPKBUILD
@@ -0,0 +1,63 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangyang497@h-partners.com
+# Maintainer: wangyang497@h-partners.com
+
+pkgname=libwbxml
+pkgver=0.11.10
+pkgrel=0
+pkgdesc="Conversion between wbxml and xml formats using C."
+url=https://github.com/libwbxml/libwbxml
+archs=("arm64-v8a" "armeabi-v7a")
+license=(MIT)
+depends=(libexpat)
+makedepends=()
+source=https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgname-$pkgver.tar.gz
+autounpack=true
+downloadpackage=true
+buildtools=
+
+builddir=$pkgname-$pkgname-$pkgver
+packagename=$builddir.tar.gz
+
+prepare() {
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd ${builddir}
+ PKG_CONFIG_LIBDIR="${pkgconfigpath}" ${OHOS_SDK}/native/build-tools/cmake/bin/cmake -DBUILD_STATIC_LIBS=true "$@" -B${ARCH}-build -S./ > $buildlog 2>&1
+ ${MAKE} VERBOSE=1 -C ${ARCH}-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd ${builddir}
+ ${MAKE} -C ${ARCH}-build install >> ${buildlog} 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ return 0
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/${builddir}
+ return 0
+}
diff --git a/thirdparty/libwbxml/HPKCHECK b/thirdparty/libwbxml/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..a76eb1ee29df0ca15673411479e3a6a484214eb5
--- /dev/null
+++ b/thirdparty/libwbxml/HPKCHECK
@@ -0,0 +1,43 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangyang497@h-partners.com
+# Maintainer: wangyang497@h-partners.com
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare() {
+ return 0
+}
+
+openharmonycheck() {
+ res=0
+ cd ${builddir}/${ARCH}-build/test/tools
+ if [ ! -e '/usr/bin/perl' ]
+ then
+ sed -i 's/\/usr\/bin\/perl/\/bin\/perl/g' ./launchTests.sh #新版rom没有/usr/目录,需要调整sed命令的调用路径
+ sed -i 's/\/usr\/bin\/diff/\/bin\/diff/g' ./launchTests.sh
+ sed -i 's/LibWBXMLTestSuite\.XXX/LibWBXMLTestSuite\.XXXXXX/g' ./launchTests.sh
+ patch -p0 < ../../../../normalize_xml.pl.patch
+ fi
+ ctest > ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ];then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+
+ fi
+ cd $OLDPWD
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/libwbxml/OAT.xml b/thirdparty/libwbxml/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0b63b7c65cb7bb117f0d8d78b25f33fb6b29646f
--- /dev/null
+++ b/thirdparty/libwbxml/OAT.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/thirdparty/libwbxml/README.OpenSource b/thirdparty/libwbxml/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..b4206565a7c12e38e3bd889dff94769eadc4f6dc
--- /dev/null
+++ b/thirdparty/libwbxml/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libwbxml",
+ "License": "LGPL V2.1 or later",
+ "License File": " https://github.com/libwbxml/libwbxml/blob/master/GNU-LGPL ",
+ "Version Number": "0.11.10",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libwbxml/libwbxml",
+ "Description": "libwbxml library is an open source library written in C specifically for processing WBXML (Wireless Binary XML) documents"
+ }
+]
diff --git a/thirdparty/libwbxml/README_zh.md b/thirdparty/libwbxml/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..6af152d3edfcc613dcdd68f1587cf59ad9b79987
--- /dev/null
+++ b/thirdparty/libwbxml/README_zh.md
@@ -0,0 +1,12 @@
+# libwbxml三方库说明
+## 功能简介
+libwbxml库是一个专门用于处理WBXML(Wireless Binary XML)文档的C语言编写的开源库,可以实现wbxml和xml格式之间的相互转换。
+
+## 三方库版本
+- 0.11.10
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
\ No newline at end of file
diff --git a/thirdparty/libwbxml/SHA512SUM b/thirdparty/libwbxml/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..8cc24c7dd0c66c9ecf15147ed9a99757b46e0988
--- /dev/null
+++ b/thirdparty/libwbxml/SHA512SUM
@@ -0,0 +1 @@
+be8097a96ac82618e9e95c1368d502f46eab959e3ac6a5d5866b33d20f710c470df96928aa9bad5e785d2a2773186eadf1df7bcd7b4ffeaf9b05b92c8e1bc8f9 libwbxml-libwbxml-0.11.10.tar.gz
\ No newline at end of file
diff --git a/thirdparty/libwbxml/docs/hap_integrate.md b/thirdparty/libwbxml/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..773cf75866bbf5773966bc800bfc994791e597e8
--- /dev/null
+++ b/thirdparty/libwbxml/docs/hap_integrate.md
@@ -0,0 +1,71 @@
+# libwbxml集成到应用hap
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+## 编译三方库
+- 下载本仓库
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+ ```
+ tpc_c_cplusplus/thirdparty/libwbxml #三方库的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM.txt #三方库校验文件
+ ```
+
+- 在lycium目录下编译三方库,编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libwbxml
+ ```
+
+- 三方库头文件及生成的库,在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```
+ libwbxml/armeabi-v7a libwbxml/arm64-v8a
+ ```
+
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将生成的.so文件拷贝至libs目录下,如下图所示
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+ ```makefile
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwbxml/${OHOS_ARCH}/lib/libwbxml2.a)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwbxml/${OHOS_ARCH}/lib/libexpat.so)
+
+
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwbxml/${OHOS_ARCH}/include)
+ ```
+## 测试三方库
+三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+进入到构建目录准备测试,32位目录为 armeabi-v7a-build,64位为 arm64-v8a-build,执行可执行文件进行测试
+
+```shell
+cd tpc_c_cplusplus/thirdparty/libwbxml/libwbxml-79461f8bd49861287c0f1689adb75e7753630e5a/arm64-v8a-build/test/tools
+ctest
+```
+
+
+
+## 参考资料
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md)
diff --git a/thirdparty/libwbxml/docs/pic/libwbxml_install_dir.png b/thirdparty/libwbxml/docs/pic/libwbxml_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..68801207d376ba80a459e36d5ed985167d0fb4b5
Binary files /dev/null and b/thirdparty/libwbxml/docs/pic/libwbxml_install_dir.png differ
diff --git a/thirdparty/libwbxml/docs/pic/libwbxml_test.png b/thirdparty/libwbxml/docs/pic/libwbxml_test.png
new file mode 100644
index 0000000000000000000000000000000000000000..fab65631289801e1f53648ede18406f773c2d1a7
Binary files /dev/null and b/thirdparty/libwbxml/docs/pic/libwbxml_test.png differ
diff --git a/thirdparty/libwbxml/normalize_xml.pl.patch b/thirdparty/libwbxml/normalize_xml.pl.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2c0251c9594c82bd29d574d50654e11ad6a9c1a2
--- /dev/null
+++ b/thirdparty/libwbxml/normalize_xml.pl.patch
@@ -0,0 +1,225 @@
+--- normalize_xml.pl 2024-08-08 13:31:55.000000000 +0800
++++ normalize_xml.pl 2024-08-08 15:25:13.988904338 +0800
+@@ -2,9 +2,7 @@
+
+ # Copyright (C) 2009 Michael Bell
+
+-use strict;
+-use warnings FATAL => qw( all );
+-use English;
++
+
+ # check params
+ # 1. original file
+@@ -54,44 +52,44 @@ do {
+ ## determine state
+
+ ## XML detection
+- if ($state eq "IGNORE" and $line =~ q{^\s*<[a-zA-Z]}) {
++ if ($state eq "IGNORE" and $line =~ q/^\s*<[a-zA-Z]/) {
+ $state = "XML_TREE";
+ }
+
+ ## version and encoding detection
+- if ($state eq "IGNORE" and $line =~ q{^\s*<\?}) {
++ if ($state eq "IGNORE" and $line =~ q/^\s*<\?/) {
+ $state = "ENC_OPEN";
+ }
+- if ($state eq "ENC_OPEN" and $line =~ q{^\s*<\?.*\?>\s*$} and $line !~ q{\sencoding="[^"]*"}) {
++ if ($state eq "ENC_OPEN" and $line =~ q/^\s*<\?.*\?>\s*$/ and $line !~ q/\sencoding="[^"]*"/) {
+ # add default encoding
+- $line =~ s{\s*\?>\s*$}{ encoding="UTF-8"?>\n};
++ $line =~ s/\s*\?>\s*$/ encoding="UTF-8"?>\n/;
+ }
+- if ($state eq "ENC_OPEN" and $line =~ q{\?>\s*$}) {
++ if ($state eq "ENC_OPEN" and $line =~ q/\?>\s*$/) {
+ ## uppercase encoding
+ my $encoding = $line;
+- $encoding =~ s{.*\sencoding="([^"]*)".*}{$1};
++ $encoding =~ s/.*\sencoding="([^"]*)".*/$1/;
+ $encoding = uc($encoding);
+- $line =~ s{\sencoding="[^"]*"}{ encoding="${encoding}"};
++ $line =~ s/\sencoding="[^"]*"/ encoding="${encoding}"/;
+ $state = "WRITE";
+ }
+
+ ## DTD detection
+- if ($state eq "IGNORE" and $line =~ q{^\s*\]}) {
++ if ($state eq "DTD_OPEN" and $line =~ q/\s\[<\?.*\?>\]/) {
+ ## such special XML stuff is lost in WBXML
+- $line =~ s{\s\[<\?.*\?>\]}{};
++ $line =~ s/\s\[<\?.*\?>\]//;
+ }
+- if ($state eq "DTD_OPEN" and $line =~ q{>\s*$}) {
++ if ($state eq "DTD_OPEN" and $line =~ q/>\s*$/) {
+ $state = "WRITE";
+ }
+
+ ## comment detection
+- if ($state eq "IGNORE" and $line =~ q{^\s*\s*$}) {
++ if ($state eq "COMMENT_OPEN" and $line =~ q/-->\s*$/) {
+ $state = "IGNORE";
+ }
+
+@@ -100,14 +98,14 @@ do {
+ $line = <$ORG_FD>;
+ }
+ if ($state eq "WRITE") {
+- $line =~ s{[\s\r\n]*$}{\n}s;
++ $line =~ s/[\s\r\n]*$/\n/s;
+ print $NEW_FD $line;
+ $line = <$ORG_FD>;
+ $state = "IGNORE";
+ }
+- if ($state =~ q{_OPEN$}) {
++ if ($state =~ q/_OPEN$/) {
+ $line .= <$ORG_FD>;
+- $line =~ s{\s*[\n\r]+\s*}{ }sg;
++ $line =~ s/\s*[\n\r]+\s*/ /sg;
+ $line .= "\n";
+ }
+ } while ($state ne "XML_TREE");
+@@ -144,12 +142,12 @@ while (1) {
+ # check state
+
+ # reset text state
+- if ($state eq "TEXT_NEWLINE" and $char !~ q{[\s\n\r]}) {
++ if ($state eq "TEXT_NEWLINE" and $char !~ q/[\s\n\r]/) {
+ $state = "NEUTRAL";
+ }
+
+ # ignore leading blanks (normalization)
+- if ($state eq "NEUTRAL" and $char =~ q{\s}) {
++ if ($state eq "NEUTRAL" and $char =~ q/\s/) {
+ next;
+ }
+
+@@ -160,7 +158,7 @@ while (1) {
+ $text = $expected;
+ $expected = "";
+ }
+- $text =~ s{\s*$}{};
++ $text =~ s/\s*$//;
+ print $NEW_FD "${text}\n";
+ $state = "NEUTRAL";
+ }
+@@ -173,25 +171,25 @@ while (1) {
+ $char = substr($line, 0, 1);
+ $line = substr($line, 1);
+ if ($char eq "!") {
+- if ($line =~ q{^--}) {
++ if ($line =~ q/^--/) {
+ ## this should be a comment
+ $char = substr($line, 0, 2);
+ $line = substr($line, 2);
+ $state = "COMMENT";
+ $text = "";
+- } elsif ($line =~ q{^\[CDATA\[}) {
++ } elsif ($line =~ q/^\[CDATA\[/) {
+ ## CDATA section detected
+ for (my $i = 0; $i < $indent; $i++) {
+ print $NEW_FD " ";
+ }
+ print $NEW_FD "" and add the complete closing tag
+ $char = ">";
+- $line =~ s{^\s*>}{};
++ $line =~ s/^\s*>//;
+ $indent--;
+ print $NEW_FD ">\n";
+ for (my $i = 0; $i < $indent; $i++) {
diff --git a/thirdparty/libwebp/README.OpenSource b/thirdparty/libwebp/README.OpenSource
index 7fdec81dd196e264b328a3c353eba37d047f7fe7..4040f9d43e309484bcb78fbf0990e776fa08592a 100644
--- a/thirdparty/libwebp/README.OpenSource
+++ b/thirdparty/libwebp/README.OpenSource
@@ -1,11 +1,29 @@
[
{
"Name": "libwebp",
- "License": "BSD-3-Clause license",
+ "License": "BSD-3-Clause",
"License File": "https://github.com/webmproject/libwebp/blob/main/COPYING",
"Version Number": "v1.3.1",
- "Owner": "1596268623@qq.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/webmproject/libwebp/archive/refs/tags/v1.3.1.tar.gz",
"Description": "WebP codec is a library to encode and decode images in WebP format. This package contains the library that can be used in other programs to add WebP support, as well as the command line tools 'cwebp' and 'dwebp' to compress and decompress images respectively."
+ },
+ {
+ "Name": "libpng",
+ "License": "libpng-2.0",
+ "License File": "https://sourceforge.net/p/libpng/code/ci/master/tree/LICENSE",
+ "Version Number": "1.6.39",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
+ },
+ {
+ "Name": "libjpeg-turbo",
+ "License": "IJG and BSD 3-clause",
+ "License File": ["https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/README.ijg","https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/LICENSE.md"],
+ "Version Number": "2.1.91",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.1.91.tar.gz",
+ "Description": "libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression"
}
]
diff --git a/thirdparty/libwebp/README_zh.md b/thirdparty/libwebp/README_zh.md
index 15c0dbca1ac66359c85d7258fadf3bc80123a49f..214a1a0f8b270f331a3e32d20d3cc45aac29fb41 100644
--- a/thirdparty/libwebp/README_zh.md
+++ b/thirdparty/libwebp/README_zh.md
@@ -1,11 +1,12 @@
# libwebp 三方库说明
## 功能简介
WebP 编解码器是一个用于编码和解码 WebP 格式图像的库。该软件包包含可用于其他程序以添加WebP支持的库,以及分别用于压缩和解压缩图像的命令行工具“cwebp”和“dwebp”。
+
+## 三方库版本
+- v1.3.1
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v1.3.1
-- WebP 编解码器是一个用于编码和解码 WebP 格式图像的库。该软件包包含可用于其他程序以添加WebP支持的库,以及分别用于压缩和解压缩图像的命令行工具“cwebp”和“dwebp”。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libwebp/docs/hap_integrate.md b/thirdparty/libwebp/docs/hap_integrate.md
index c72916b5f9446e5e51564c34349af344c4c0e15c..27f9c7bfb5f95fe4f883189e2b4c55827a7736de 100644
--- a/thirdparty/libwebp/docs/hap_integrate.md
+++ b/thirdparty/libwebp/docs/hap_integrate.md
@@ -3,12 +3,8 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libwmf/HPKBUILD b/thirdparty/libwmf/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..5c159b1382ef89a02b30aae4239af6db67f748c2
--- /dev/null
+++ b/thirdparty/libwmf/HPKBUILD
@@ -0,0 +1,96 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han
+# Maintainer: Jeff Han
+
+pkgname=libwmf
+pkgver=v0.2.13
+pkgrel=0
+pkgdesc="libwmf is a library designed to parse and process Windows Media Format (WMF) files"
+url="https://github.com/caolanm/libwmf"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("GPL-2.0 license")
+depends=("freetype2" "libpng" "bzip2_1_0_8" "brotli" "harfbuzz" "libxml2")
+
+source="https://github.com/caolanm/$pkgname/archive/refs/tags/$pkgver.tar.gz"
+
+autounpack=true
+downloadpackage=true
+buildtools="configure"
+
+builddir=$pkgname-${pkgver:1}
+packagename=$builddir.tar.gz
+
+source envset.sh
+host=
+
+prepare() {
+ if [ $ARCH == "arm64-v8a" ];then
+ setarm64ENV
+ host=aarch64-linux
+ elif [ $ARCH == "armeabi-v7a" ];then
+ setarm32ENV
+ host=arm-linux
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+
+ mkdir $ARCH-build
+ cp -r $builddir/* $ARCH-build
+}
+
+build() {
+ cd $ARCH-build
+ PKG_CONFIG_LIBDIR=$pkgconfigpath CFLAGS="-I$LYCIUM_ROOT/usr/freetype2/$ARCH/include/freetype2 -I$LYCIUM_ROOT/usr/libpng/$ARCH/include -I$LYCIUM_ROOT/usr/libxml2/$ARCH/include/libxml2" LDFLAGS="-L$LYCIUM_ROOT/usr/freetype2/$ARCH/lib -L$LYCIUM_ROOT/usr/libpng/$ARCH/lib -L$LYCIUM_ROOT/usr/bzip2_1_0_8/$ARCH/lib -L$LYCIUM_ROOT/usr/brotli/$ARCH/lib -L$LYCIUM_ROOT/usr/harfbuzz/$ARCH/lib -L$LYCIUM_ROOT/usr/libxml2/$ARCH/lib -lpng -lfreetype -lbz2 -lbrotlidec -lharfbuzz -lxml2" ./configure "$@" --host=$host --prefix=$LYCIUM_ROOT/usr/$pkgname/$ARCH > $buildlog 2>&1
+
+ $MAKE >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $ARCH-build
+ $MAKE install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+check() {
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ unsetarm32ENV
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ unsetarm64ENV
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+ unset host
+ echo "The test must be on an OpenHarmony device!"
+
+ cd $ARCH-build/src/convert
+ files=("wmf2eps" "wmf2fig" "wmf2gd" "wmf2svg")
+ for file in "${files[@]}"; do
+ # 使用sed命令将文件中的所有/usr/bin/sed更改为/data/CIusr/bin/sed
+ sed -i.bak 's|/usr/bin/sed|/data/CIusr/bin/sed|g' "$file"
+ done
+ cd $OLDPWD
+}
+
+# 清理环境
+cleanbuild() {
+ rm -rf ${PWD}/$builddir ${PWD}/arm64-v8a-build ${PWD}/armeabi-v7a-build
+}
\ No newline at end of file
diff --git a/thirdparty/libwmf/HPKCHECK b/thirdparty/libwmf/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..ed7feceb36578d8bd43e051fb26a7b5bc6c51e5c
--- /dev/null
+++ b/thirdparty/libwmf/HPKCHECK
@@ -0,0 +1,88 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ cd $ARCH-build
+ echo "total test 4" > $logfile 2>&1
+ total_tests=4
+ passed_tests=0
+
+ ./src/convert/wmf2eps -o output.eps ./examples/2doorvan.wmf >> $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "1/4 wmf2eps .......................... failed" >> $logfile 2>&1
+ else
+ echo "1/4 wmf2eps .......................... passed" >> $logfile 2>&1
+ ((passed_tests++))
+ fi
+
+ ./src/convert/wmf2fig -o outputfig.eps ./examples/fjftest.wmf >> $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "2/4 wmf2fig .......................... failed" >> $logfile 2>&1
+ else
+ echo "2/4 wmf2fig .......................... passed" >> $logfile 2>&1
+ ((passed_tests++))
+ fi
+
+ ./src/convert/wmf2gd -o output.png ./examples/sample.wmf >> $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "3/4 wmf2gd .......................... failed" >> $logfile 2>&1
+ else
+ echo "3/4 wmf2gd .......................... passed" >> $logfile 2>&1
+ ((passed_tests++))
+ fi
+
+ ./src/convert/wmf2svg -o output.svg ./examples/cell.wmf >> $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ echo "4/4 wmf2svg .......................... failed" >> $logfile 2>&1
+ else
+ echo "4/4 wmf2svg .......................... passed" >> $logfile 2>&1
+ ((passed_tests++))
+ fi
+
+ test_fail=$((total_tests - passed_tests))
+ if [ $passed_tests -ne 4 ]
+ then
+ echo "$passed_tests tests passed, $test_fail tests failed" >> $logfile 2>&1
+ else
+ echo "100% tests passed, 0 tests failed out of 4" >> $logfile 2>&1
+ fi
+
+ # 将生成的图片拷贝到tpc_c_cplusplus/lycium/check_result/manual_confirm/libwmf下
+ # 将四张图片拷贝到本地,进行人工对比
+ # 生成的.eps可以在浏览器搜索在线eps查看器查看图,对比原图2doorvan.wmf是否一致
+ # 生成的.png可直接打开,对比原图fjftest.wmf是否一致
+ # 生成的.svg可以通过WPS图片查看,对比原图cell.wmf是否一致
+ # 生成的outputfig.eps和linux下执行的结果用对比工具对比内容,存在时间不同
+ mkdir -p $CHECK_RESULT_PATH/manual_confirm/${pkgname}
+ cp ./output.eps $CHECK_RESULT_PATH/manual_confirm/${pkgname}
+ cp ./outputfig.eps $CHECK_RESULT_PATH/manual_confirm/${pkgname}
+ cp ./output.png $CHECK_RESULT_PATH/manual_confirm/${pkgname}
+ cp ./output.svg $CHECK_RESULT_PATH/manual_confirm/${pkgname}
+
+ cd $OLDPWD
+ return $test_fail
+}
diff --git a/thirdparty/libwmf/OAT.xml b/thirdparty/libwmf/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c910b32a0f5cab1461a8807c1f474d998359e04
--- /dev/null
+++ b/thirdparty/libwmf/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/thirdparty/libwmf/README.OpenSource b/thirdparty/libwmf/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..2d84b74790614a775f30d5dd0f90597c84a9187d
--- /dev/null
+++ b/thirdparty/libwmf/README.OpenSource
@@ -0,0 +1,65 @@
+[
+ {
+ "Name": "libwmf",
+ "License": "GPL-2.0 license",
+ "License File": "https://github.com/caolanm/libwmf/blob/master/COPYING",
+ "Version Number": "v0.2.13",
+ "Owner": "hanjinfei@foxmail.com",
+ "Upstream URL": "https://github.com/caolanm/libwmf",
+ "Description": "libwmf is a library designed to parse and process Windows Media Format (WMF) files. "
+ },
+ {
+ "Name": "freetype2",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/freetype/freetype/blob/master/LICENSE.TXT",
+ "Version Number": "2.13.0",
+ "Owner": "tianyong13@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/freetype/files/freetype2/2.13.0/freetype-2.13.0.tar.xz",
+ "Description": "FreeType is written in C. It is designed to be small, efficient, and highly customizable while capable of producing high-quality output (glyph images) of most vector and bitmap font formats for digital typography. FreeType is a freely available and portable software library to render fonts."
+ },
+ {
+ "Name": "libpng",
+ "License": "zlib/libpng License",
+ "License File": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/LICENSE.md/download",
+ "Version Number": "1.6.39",
+ "Owner": "wupingyuan@huawei.com",
+ "Upstream URL": "https://sourceforge.net/projects/libpng/files/libpng16/1.6.39/libpng-1.6.39.tar.xz",
+ "Description": "LIBPNG: Portable Network Graphics support, official libpng repository"
+ },
+ {
+ "Name": "bzip2_1_0_8",
+ "License": "bzip2-1.0.6",
+ "License File": "https://sourceforge.net/p/bzip2/bzip2/ci/bzip2-1_0_6/tree/LICENSE",
+ "Version Number": "1.0.8",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://sourceware.org/git/bzip2",
+ "Description": "bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression."
+ },
+ {
+ "Name": "brotli",
+ "License": "MIT License",
+ "License File": "https://github.com/google/brotli/blob/master/LICENSE",
+ "Version Number": "v1.0.9",
+ "Owner": "hanjinfei@foxmail.com",
+ "Upstream URL": "https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz",
+ "Description": "Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression"
+ },
+ {
+ "Name": "harfbuzz",
+ "License": "Old MIT",
+ "License File": "https://github.com/harfbuzz/harfbuzz/blob/main/COPYING",
+ "Version Number": "7.1.0",
+ "Owner": "chenbaodi@huawei.com",
+ "Upstream URL": "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/7.3.0.tar.gz",
+ "Description": "HarfBuzz text shaping engine"
+ },
+ {
+ "Name": "libxml2",
+ "License": " MIT license",
+ "License File": "https://github.com/GNOME/libxml2/blob/master/README.md",
+ "Version Number": "v2.11.3",
+ "Owner": "hanjinfei@foxmail.com",
+ "Upstream URL": "https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.3.tar.gz",
+ "Description": "libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project."
+ }
+]
diff --git a/thirdparty/libwmf/README_zh.md b/thirdparty/libwmf/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..aa0657663093cca72978d632f017bfa90a03b0a1
--- /dev/null
+++ b/thirdparty/libwmf/README_zh.md
@@ -0,0 +1,15 @@
+# libwmf 三方库说明
+
+## 功能简介
+
+libwmf libwmf是一个用于解析和处理Windows媒体格式(WMF)文件的库。
+
+## 三方库版本
+- v0.2.13
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
+
+- [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libwmf/docs/hap_integrate.md b/thirdparty/libwmf/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..8f1471bd231d0578fc096763409ede9f5db37d4e
--- /dev/null
+++ b/thirdparty/libwmf/docs/hap_integrate.md
@@ -0,0 +1,109 @@
+# libwmf集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/libwmf #三方库libwmf的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本、license等信息
+ ├── README_zh.md
+ ```
+
+- 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh libwmf
+ ```
+- 
+
+- 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ libwmf/arm64-v8a libwmf/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 需要将libwmf生成的so动态库文件以及依赖的动态库文件,下图所示拷贝到entry/libs目录下
+
+- 
+
+- 在IDE的cpp目录下新增thirdparty目录,将生成的二进制文件以及头文件拷贝到该目录下,如下图所示
+
+- 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+#将三方库的头文件和库文件加入工程中
+```shell
+#将三方库依赖的库文件加入工程中
+target_link_libraries(entry PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype2/${OHOS_ARCH}/lib/libfreetype.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/lib/libpng16.so.16
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/${OHOS_ARCH}/lib/libbrotlidec.so.1
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/${OHOS_ARCH}/lib/libbrotlienc.so.1
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/${OHOS_ARCH}/lib/libbrotlicommon.so.1
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bzip2/${OHOS_ARCH}/lib/libbz2.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/lib/libharfbuzz-cairo.so.0
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/lib/libharfbuzz.so.0
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/lib/libharfbuzz-subset.so.0
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/lib/liblzma.so.5
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/lib/libxml2.so
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwmf/${OHOS_ARCH}/lib/libwmf.a
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwmf/${OHOS_ARCH}/lib/libwmflite.a)
+
+#将三方库头文件加入工程中
+target_include_directories(entry PRIVATE
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype2/${OHOS_ARCH}/include/freetype2
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/bzip2/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/harfbuzz/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/xz/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libxml2/${OHOS_ARCH}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libwmf/${OHOS_ARCH}/include)
+```
+
+## 测试三方库
+
+三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),可以查看HPKCHECK里面单独执行每条用例的方法,将生成的output.png与原图sample.wmf进行对比,查看是否一致,结果如图所示
+```shell
+ cd /data/tpc_c_cplusplus/thirdparty/libwmf/armeabi-v7a-build(或者cd /data/tpc_c_cplusplus/thirdparty/libwmf/arm64-v8a-build)
+ ./src/convert/wmf2gd -o output.png ./examples/sample.wmf
+```
+
+测试结果如图所示:
+ - 
+ - 
+
+## 参考资料
+
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+- [libwmf三方库地址](https://github.com/caolanm/libwmf)
diff --git a/thirdparty/libwmf/docs/pic/build_libwmf.PNG b/thirdparty/libwmf/docs/pic/build_libwmf.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..9c4d3acb5799d96f839b4172b03001b09c4d1c38
Binary files /dev/null and b/thirdparty/libwmf/docs/pic/build_libwmf.PNG differ
diff --git a/thirdparty/libwmf/docs/pic/compare.PNG b/thirdparty/libwmf/docs/pic/compare.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..e0416fcfb98f52f37c1050e63bc083cfce30efec
Binary files /dev/null and b/thirdparty/libwmf/docs/pic/compare.PNG differ
diff --git a/thirdparty/libwmf/docs/pic/libwmf_include_ide.PNG b/thirdparty/libwmf/docs/pic/libwmf_include_ide.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..c2bea0e4483886ca883453d840b86a51a23d6bae
Binary files /dev/null and b/thirdparty/libwmf/docs/pic/libwmf_include_ide.PNG differ
diff --git a/thirdparty/libwmf/docs/pic/libwmf_so_ide.PNG b/thirdparty/libwmf/docs/pic/libwmf_so_ide.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..9f30b5773ccd1baf021859f9c6f6f3639b8fad3c
Binary files /dev/null and b/thirdparty/libwmf/docs/pic/libwmf_so_ide.PNG differ
diff --git a/thirdparty/libwmf/docs/pic/run_png.PNG b/thirdparty/libwmf/docs/pic/run_png.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..83baecb59f942f789de9342d6740d3170a56dc43
Binary files /dev/null and b/thirdparty/libwmf/docs/pic/run_png.PNG differ
diff --git a/thirdparty/libwtf/HPKBUILD b/thirdparty/libwtf/HPKBUILD
index d021645c8e930bf275fd60a8d22f173958a8fb5b..4ca437cf228e18cacc172f8cc204fe44a8fbc482 100644
--- a/thirdparty/libwtf/HPKBUILD
+++ b/thirdparty/libwtf/HPKBUILD
@@ -40,7 +40,8 @@ prepare() {
patch -p1 < `pwd`/../JavaScriptCore_oh_pkg.patch
# 修改因平台差异导致char类型符号位差异,而引起相关测试用例报错
patch -p1 < `pwd`/../JavaScriptCore_oh_test.patch
-
+ # 不能访问的/tmp 修改为 /data/local/tmp
+ patch -p1 < ../libwtf_ohos_test.patch
# patch只需要打一次,关闭打patch
patchflag=false
cd $OLDPWD
diff --git a/thirdparty/libwtf/HPKCHECK b/thirdparty/libwtf/HPKCHECK
index 131b6e939b34b99f39665d6b838646789eb34438..965c6c611ea8e5de1fb15db6242ad3096d48846e 100644
--- a/thirdparty/libwtf/HPKCHECK
+++ b/thirdparty/libwtf/HPKCHECK
@@ -18,12 +18,8 @@ logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_
openharmonycheck() {
res=0
cd ${builddir}/${ARCH}-build
- # 拷贝自动化测试需要的so文件
- mkdir -p /usr/local/lib/libwtf
- cp ${LYCIUM_ROOT}/../lycium/usr/icu/arm64-v8a/lib/* /usr/local/lib/libwtf/
- cp ./lib/libgtest.so /usr/local/lib/libwtf/
- export LD_LIBRARY_PATH=/usr/local/lib/libwtf:$LD_LIBRARY_PATH
- # 测试前注意时区改为GMT-07:00,否则会夏令时检测会不通过
+ # 测试所需的gtest.so 需要额外导出
+ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
ctest > ${logfile} 2>&1
res=$?
if [ $res -ne 0 ]
diff --git a/thirdparty/libwtf/README_zh.md b/thirdparty/libwtf/README_zh.md
index 15c4ae136f20db576e84c08f91df148555498882..5978dc38c02423f3408337e6ca89ae77f4dc2b12 100644
--- a/thirdparty/libwtf/README_zh.md
+++ b/thirdparty/libwtf/README_zh.md
@@ -1,11 +1,12 @@
# libwtf三方库说明
## 功能简介
libwtf是一个网络模版框架。
+
+## 三方库版本
+- webkitgtk-2.41.90
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:webkitgtk-2.41.90
-- 当前适配的功能: 提供网络模版框架能力。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libwtf/libwtf_ohos_test.patch b/thirdparty/libwtf/libwtf_ohos_test.patch
new file mode 100644
index 0000000000000000000000000000000000000000..dfde361f3c2f0cc0d9455b4d2054bd35df93a348
--- /dev/null
+++ b/thirdparty/libwtf/libwtf_ohos_test.patch
@@ -0,0 +1,12 @@
+diff -Nura WebKit-webkitgtk-2.41.90/Source/ThirdParty/gtest/src/gtest-port.cc WebKit-webkitgtk-2.41.90_patchdir/Source/ThirdParty/gtest/src/gtest-port.cc
+--- WebKit-webkitgtk-2.41.90/Source/ThirdParty/gtest/src/gtest-port.cc 2023-08-10 13:57:48.000000000 +0800
++++ WebKit-webkitgtk-2.41.90_patchdir/Source/ThirdParty/gtest/src/gtest-port.cc 2024-08-14 20:00:55.750636944 +0800
+@@ -1112,7 +1112,7 @@
+ // guaranteed to be mounted, or may have a delay in mounting.
+ char name_template[] = "/data/local/tmp/gtest_captured_stream.XXXXXX";
+ # else
+- char name_template[] = "/tmp/captured_stream.XXXXXX";
++ char name_template[] = "/data/local/tmp/captured_stream.XXXXXX";
+ # endif // GTEST_OS_LINUX_ANDROID
+ const int captured_fd = mkstemp(name_template);
+ if (captured_fd == -1) {
\ No newline at end of file
diff --git a/thirdparty/libxls/README_zh.md b/thirdparty/libxls/README_zh.md
index a63c026bf266fcf2b03ca3a0c923ce2ca5de21bf..20295772fae5e891b208111efda1b191ae2f4ecf 100644
--- a/thirdparty/libxls/README_zh.md
+++ b/thirdparty/libxls/README_zh.md
@@ -1,11 +1,12 @@
# libxls三方库说明
## 功能简介
libxls是一个解析Excel表格的库。
+
+## 三方库版本
+- v1.6.2
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v1.6.2
-- 当前适配的功能:解析Excel表格
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libxls/docs/hap_integrate.md b/thirdparty/libxls/docs/hap_integrate.md
index 23ba0a7e2eb85095a2f64e124e8f0a3a6370e642..33095b11672ec10fb3c63ee71ae9207642ddef91 100644
--- a/thirdparty/libxls/docs/hap_integrate.md
+++ b/thirdparty/libxls/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libxls集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libxlsxwriter/README_zh.md b/thirdparty/libxlsxwriter/README_zh.md
index 8f41337abe322cbeba29459d4175d04b5b3ad3be..9fd40d1e1c37bcb09c51acb99a4a2ea68af31779 100644
--- a/thirdparty/libxlsxwriter/README_zh.md
+++ b/thirdparty/libxlsxwriter/README_zh.md
@@ -1,11 +1,12 @@
# libxlsxwriter三方库说明
## 功能简介
libxlsxwriter是一个可以向Excel写入文字和图片的库。
+
+## 三方库版本
+- RELEASE_1.1.5
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:RELEASE_1.1.5
-- 当前适配的功能:Excel写入文字和图片
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libxlsxwriter/docs/hap_integrate.md b/thirdparty/libxlsxwriter/docs/hap_integrate.md
index 99e8d0f22c44b86ae3b517619518de7312f39543..4125716e20ce4160e6e8b3583b8923d3886c10c6 100644
--- a/thirdparty/libxlsxwriter/docs/hap_integrate.md
+++ b/thirdparty/libxlsxwriter/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libxlsxwriter集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libxml2/HPKBUILD b/thirdparty/libxml2/HPKBUILD
index 73d4f90413012d63f3ebfbfcbdc9b84496adb23a..328c4b17ef47330b67f2d0b37c8d13f926760855 100644
--- a/thirdparty/libxml2/HPKBUILD
+++ b/thirdparty/libxml2/HPKBUILD
@@ -7,7 +7,7 @@ pkgdesc="libxml2 is an XML toolkit implemented in C, originally developed for th
url="https://github.com/GNOME/libxml2"
archs=("armeabi-v7a" "arm64-v8a")
license=("MIT")
-depends=("xz" "zlib")
+depends=("xz" "zlib_1_3_1")
makedepends=()
# 官方下载地址source="https://github.com/GNOME/$pkgname/archive/refs/tags/$pkgver.tar.gz"受网络影响可能存在下载失败的情况,现使用gitee镜像可以与官方仓库保持同步
@@ -28,7 +28,7 @@ build() {
# cmake 需要高版本(同zstd),cmake版本不一致导致lzma无法被自动find 关闭python
cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L -DCMAKE_C_FLAGS="-munaligned-access" \
-DLIBLZMA_LIBRARY=${LYCIUM_ROOT}/usr/xz/$ARCH/lib/liblzma.so \
- -DLIBLZMA_INCLUDE_DIR=${LYCIUM_ROOT}/usr/xz/$ARCH/include -DZLIB_INCLUDE_DIR=${LYCIUM_ROOT}/usr/zlib/$ARCH/include \
+ -DLIBLZMA_INCLUDE_DIR=${LYCIUM_ROOT}/usr/xz/$ARCH/include -DZLIB_INCLUDE_DIR=${LYCIUM_ROOT}/usr/zlib_1_3_1/$ARCH/include \
-DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_PYTHON=OFF > `pwd`/$ARCH-build/build.log 2>&1
make VERBOSE=1 -j4 -C $ARCH-build >> `pwd`/$ARCH-build/build.log 2>&1
ret=$?
diff --git a/thirdparty/libxml2/README.OpenSource b/thirdparty/libxml2/README.OpenSource
index c0f18c1bca0dd84ed69f105407231932ae8d7ad6..5a81b80953b35a602ab6f6b7c8610d28ef58be17 100644
--- a/thirdparty/libxml2/README.OpenSource
+++ b/thirdparty/libxml2/README.OpenSource
@@ -2,10 +2,29 @@
{
"Name": "libxml2",
"License": " MIT license",
- "License File": "README",
+ "License File": "https://github.com/GNOME/libxml2/blob/master/Copyright",
"Version Number": "v2.11.3",
- "Owner": "hanjinfei@foxmail.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.3.tar.gz",
"Description": "libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project."
+ },
+ {
+ "Name": "xz",
+ "License": "Public Domain and LGPL-2.1 and GPL-2.0 and GPL-3.0",
+ "License File": ["https://github.com/tukaani-project/xz/blob/v5.4/COPYING","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv2",
+ "https://github.com/tukaani-project/xz/blob/v5.4/COPYING.GPLv3","https://github.com/tukaani-project/xz/blob/v5.4/COPYING.LGPLv2.1"],
+ "Version Number": "5.4.1",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/tukaani-project/xz/releases/download/v5.4.1/xz-5.4.1.tar.gz",
+ "Description": "XZ Utils is free general-purpose data compression software with a high compression ratio. "
+ },
+ {
+ "Name": "zlib",
+ "License": "zlib License",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.2.13",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz",
+ "Description": "A massively spiffy yet delicately unobtrusive compression library."
}
]
diff --git a/thirdparty/libxml2/README_zh.md b/thirdparty/libxml2/README_zh.md
index e5812170097c6f39ae384e2ce7dccda8682bb68a..23ecbbfe3b805f110183636c85cd63ceac5a1766 100644
--- a/thirdparty/libxml2/README_zh.md
+++ b/thirdparty/libxml2/README_zh.md
@@ -1,11 +1,12 @@
# libxml2三方库说明
## 功能简介
libxml2是一个用于解析XML文档的C语言库。它提供了一组API,可以用于读取、修改和创建XML文档
+
+## 三方库版本
+- v2.11.3
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.11.3
-- 当前适配的功能:XML格式解析
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libxml2/docs/hap_integrate.md b/thirdparty/libxml2/docs/hap_integrate.md
index f010a32f1f76d806c054c00b1e2d994649d6b6c1..763d36a6dba025ef198c389042e8a28a49fe31ef 100755
--- a/thirdparty/libxml2/docs/hap_integrate.md
+++ b/thirdparty/libxml2/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libxml2集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libxslt/HPKBUILD b/thirdparty/libxslt/HPKBUILD
index b43aa9e5c33d7b5cde2c15a5233d673ff87b0783..a6dc00ae5fe5a4dabdaef5cc51472476e454b2ea 100644
--- a/thirdparty/libxslt/HPKBUILD
+++ b/thirdparty/libxslt/HPKBUILD
@@ -51,6 +51,9 @@ prepare() {
build() {
cd $builddir-$ARCH-build
PKG_CONFIG_LIBDIR=$pkgconfigpath ./configure "$@" --enable-static --without-python --host=$host >> `pwd`/build.log 2>&1
+ find . -name Makefile -exec sed -i 's#/bin/bash#bash#' {} +
+ find . -name Makefile -exec sed -i 's#/usr/bin/sed#/bin/sed#' {} +
+ sed -i 's#/usr/bin/sed#/bin/sed#' libtool
make -j4 >> `pwd`/build.log 2>&1
ret=$?
@@ -86,6 +89,8 @@ check() {
# 编译测试程序
make check >> `pwd`/build.log 2>&1
+ find . -type f -exec sed -i 's/\/usr\/bin\/sed/\/bin\/sed/g' {} +
+ sed -i 's/\/bin\/bash/\/data\/CIusr\/bin\/bash/g' tests/runtest
cd $OLDPWD
echo "The test must be on an OpenHarmony device!"
diff --git a/thirdparty/libxslt/HPKCHECK b/thirdparty/libxslt/HPKCHECK
index 5304f0e76a250bc852dc509f596f6f6cd8721622..3dc591290aad912035ac9c7099704b9110fd6a6b 100644
--- a/thirdparty/libxslt/HPKCHECK
+++ b/thirdparty/libxslt/HPKCHECK
@@ -19,24 +19,26 @@ checkprepare(){
export LIBXSLT_PLUGINS_PATH=`pwd`/$builddir-$ARCH-build/tests/.libs
# 检查/usr/bin目录下是否存在sed软连接
- if [ ! -f "/usr/bin/sed" ]; then
+ if [ ! -f "/bin/sed" ]; then
# 创建软连接
- ln -s /usr/bin/busybox /usr/bin/sed
+ ln -s /bin/busybox /bin/sed
else
hassed = true
fi
+
}
openharmonycheck() {
res=0
cd $builddir-$ARCH-build/tests
- /usr/bin/make check_test >> ${logfile} 2>&1
+ sed -i 's/check_test: \$(MAKE) \$(AM_MAKEFLAGS) check-local/check_test: check-local/' Makefile
+ /data/CIusr/bin/make check_test >> ${logfile} 2>&1
res=$?
unset LIBXSLT_PLUGINS_PATH
cd $OLDPWD
if [ $hassed == false ];then
- rm -rf /usr/bin/sed
+ rm -rf /bin/sed
fi
return $res
diff --git a/thirdparty/libxslt/README.OpenSource b/thirdparty/libxslt/README.OpenSource
index f837ce81536809b85993d7d5301a5f8da32025be..5f152efaafa66bf6001de93e962c8a0cf7b60c9b 100644
--- a/thirdparty/libxslt/README.OpenSource
+++ b/thirdparty/libxslt/README.OpenSource
@@ -2,10 +2,19 @@
{
"Name": "libxslt",
"License": "MIT license",
- "License File": "https://gitlab.gnome.org/GNOME/libxslt/-/wikis/home",
+ "License File": "https://gitlab.gnome.org/GNOME/libxslt/-/blob/master/Copyright",
"Version Number": "1.1.38",
- "Owner": "kanchengc@isoftstone.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.38.tar.xz",
"Description": "libxslt itself is a an XML language to define transformation for XML."
+ },
+ {
+ "Name": "libxml2",
+ "License": " MIT license",
+ "License File": "https://github.com/GNOME/libxml2/blob/master/Copyright",
+ "Version Number": "v2.11.3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.3.tar.gz",
+ "Description": "libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project."
}
]
diff --git a/thirdparty/libxslt/README_zh.md b/thirdparty/libxslt/README_zh.md
index cb1640d76cbb980edcaab93b7ba233d82bb26f43..8070e24fd28d84c04539e1cc087b1232a2b9e3e6 100644
--- a/thirdparty/libxslt/README_zh.md
+++ b/thirdparty/libxslt/README_zh.md
@@ -1,14 +1,15 @@
# libxslt三方库说明
## 功能简介
Libxslt库用于处理和转换XML文档。
-## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
+## 三方库版本
+- 1.1.38
-- 三方库版本:1.1.38
+## 已适配功能
+- 允许通过使用XSLT样式表来转换XML文档的结构和内容。
-- 当前适配功能:允许通过使用XSLT样式表来转换XML文档的结构和内容。
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [系统hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libxslt/docs/hap_integrate.md b/thirdparty/libxslt/docs/hap_integrate.md
index eec161b7ba0f76e5a3100f51ee922705a2f4b6a8..af9869d50aa82bd53f33983b97622cb759c7ba67 100644
--- a/thirdparty/libxslt/docs/hap_integrate.md
+++ b/thirdparty/libxslt/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libxslt集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
diff --git a/thirdparty/libyaml/HPKBUILD b/thirdparty/libyaml/HPKBUILD
index dbd8a1e3a1ff61ef495ac40c159c39d75873ade8..1d0cf58c83c32982b8e025ac95df819a63808af0 100644
--- a/thirdparty/libyaml/HPKBUILD
+++ b/thirdparty/libyaml/HPKBUILD
@@ -20,7 +20,7 @@ pkgrel=0
pkgdesc="LibYAML - A C library for parsing and emitting YAML."
url="https://github.com/yaml/libyaml"
archs=("armeabi-v7a" "arm64-v8a")
-license=("MIT Licensed")
+license=("MIT License")
depends=()
makedepends=()
install=
diff --git a/thirdparty/libyaml/HPKCHECK b/thirdparty/libyaml/HPKCHECK
index 8e1afa1bb0bdc0cb1c13d148d035dd2bfc9d9a7a..e5ddab779886638bd21839a072710cdfd7d0a754 100644
--- a/thirdparty/libyaml/HPKCHECK
+++ b/thirdparty/libyaml/HPKCHECK
@@ -31,7 +31,7 @@ openharmonycheck() {
echo "1/13 test-version .......................... failed" >> ${logfile} 2>&1
else
echo "1/13 test-version .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./test-reader >> ${logfile} 2>&1
@@ -41,7 +41,7 @@ openharmonycheck() {
echo "2/13 test-reader .......................... failed" >> ${logfile} 2>&1
else
echo "2/13 test-reader .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
cat ../examples/anchors.yaml | ./example-deconstructor >> ${logfile} 2>&1
@@ -51,7 +51,7 @@ openharmonycheck() {
echo "3/13 example-deconstructor .......................... failed" >> ${logfile} 2>&1
else
echo "3/13 example-deconstructor .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
cat ../examples/anchors.yaml | ./example-deconstructor-alt >> ${logfile} 2>&1
@@ -61,7 +61,7 @@ openharmonycheck() {
echo "4/13 example-deconstructor-alt .......................... failed" >> ${logfile} 2>&1
else
echo "4/13 example-deconstructor-alt .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
cat ../examples/anchors.yaml | ./example-reformatter >> ${logfile} 2>&1
@@ -71,7 +71,7 @@ openharmonycheck() {
echo "5/13 example-reformatter .......................... failed" >> ${logfile} 2>&1
else
echo "5/13 example-reformatter .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
cat ../examples/anchors.yaml | ./example-reformatter-alt >> ${logfile} 2>&1
@@ -81,7 +81,7 @@ openharmonycheck() {
echo "6/13 example-reformatter-alt .......................... failed" >> ${logfile} 2>&1
else
echo "6/13 example-reformatter-alt .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-dumper ../examples/global-tag.yaml >> ${logfile} 2>&1
@@ -91,7 +91,7 @@ openharmonycheck() {
echo "7/13 run-dumper .......................... failed" >> ${logfile} 2>&1
else
echo "7/13 run-dumper .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-emitter ../examples/global-tag.yaml >> ${logfile} 2>&1
@@ -101,7 +101,7 @@ openharmonycheck() {
echo "8/13 run-emitter .......................... failed" >> ${logfile} 2>&1
else
echo "8/13 run-emitter .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-parser-test-suite ../examples/anchors.yaml | ./run-emitter-test-suite >> ${logfile} 2>&1
@@ -111,7 +111,7 @@ openharmonycheck() {
echo "9/13 run-emitter-test-suite .......................... failed" >> ${logfile} 2>&1
else
echo "9/13 run-emitter-test-suite .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-loader ../examples/global-tag.yaml >> ${logfile} 2>&1
@@ -121,7 +121,7 @@ openharmonycheck() {
echo "10/13 run-loader .......................... failed" >> ${logfile} 2>&1
else
echo "10/13 run-loader .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-parser ../examples/global-tag.yaml >> ${logfile} 2>&1
@@ -131,7 +131,7 @@ openharmonycheck() {
echo "11/13 run-parser .......................... failed" >> ${logfile} 2>&1
else
echo "11/13 run-parser .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-parser-test-suite ../examples/anchors.yaml >> ${logfile} 2>&1
@@ -141,7 +141,7 @@ openharmonycheck() {
echo "12/13 run-parser-test-suite .......................... failed" >> ${logfile} 2>&1
else
echo "12/13 run-parser-test-suite .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
./run-scanner ../examples/global-tag.yaml >> ${logfile} 2>&1
@@ -151,10 +151,10 @@ openharmonycheck() {
echo "13/13 run-scanner .......................... failed" >> ${logfile} 2>&1
else
echo "13/13 run-scanner .......................... passed" >> ${logfile} 2>&1
- passed_tests=`expr $passed_tests + 1`
+ ((passed_tests++))
fi
- test_fail=$((total_tests - passed_tests))
+ test_fail=$((total_tests - passed_tests))
if [ $passed_tests -ne 13 ]
then
echo "$passed_tests tests passed, $test_fail tests failed" >> ${logfile} 2>&1
diff --git a/thirdparty/libyaml/README.OpenSource b/thirdparty/libyaml/README.OpenSource
index c24209d45de38b0d28f8f9b91e74cb7c7e086aaf..b5fa5cbff109987e178cfbf04c71cf2ff6ce2cbb 100644
--- a/thirdparty/libyaml/README.OpenSource
+++ b/thirdparty/libyaml/README.OpenSource
@@ -1,8 +1,8 @@
[
{
"Name": "libyaml",
- "License": "MIT",
- "License File": "LICENSE",
+ "License": "MIT License",
+ "License File": "https://github.com/yaml/libyaml/blob/master/License",
"Version Number": "0.2.5",
"Owner": "huangminzhong2@huawei.com",
"Upstream URL": "https://github.com/yaml/libyaml/archive/refs/tags/0.2.5.tar.gz",
diff --git a/thirdparty/libyaml/README_zh.md b/thirdparty/libyaml/README_zh.md
index d4abb5266a3a4653c527b8dd891d2e715ea9f299..7562eea3d20ded8d6aa8eceec40b7d2946b161ac 100644
--- a/thirdparty/libyaml/README_zh.md
+++ b/thirdparty/libyaml/README_zh.md
@@ -1,11 +1,12 @@
# libyaml三方库说明
## 功能简介
libyaml是一个解析和发出YAML的C库。
+
+## 三方库版本
+- 0.2.5
+
## 使用约束
-- IDE版本:DevEco Studio 4.1.3 Release
-- SDK版本:ohos_sdk_public 5.0.3.100 (API Version 10 Release)
-- 三方库版本:0.2.5
-- 当前适配的功能:
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libyaml/docs/hap_integrate.md b/thirdparty/libyaml/docs/hap_integrate.md
index dccf490d07b45facb4e3aa8a169c65dc08c846fa..7f0bffd4385ae9a96d502ef124686239cc59cbb8 100644
--- a/thirdparty/libyaml/docs/hap_integrate.md
+++ b/thirdparty/libyaml/docs/hap_integrate.md
@@ -62,17 +62,17 @@ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/
三方库的测试使用原库自带的测试用例来做测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
-进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),可以查看HPKCHECK里面单独执行每条用例的方法,也可以执行run-all-tests.sh,结果如图所示
+进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),可以查看HPKCHECK里面单独执行每条用例的方法,这里执行一条用例test-version,结果如图所示
```shell
- cd /data/tpc_c_cplusplus/thirdparty/libyaml/libyaml-0.2.5/$ARCH-build
- ./run-all-tests.sh
+ cd /data/tpc_c_cplusplus/thirdparty/libyaml/libyaml-0.2.5/armeabi-v7a-build(或者cd /data/tpc_c_cplusplus/thirdparty/libyaml/libyaml-0.2.5/arm64-v8a-build)
+ ./test-version
```
测试结果如图所示:
- - 
+ - 
## 参考资料
- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
-- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md)
+- [libyaml三方库地址](https://github.com/yaml/libyaml)
diff --git a/thirdparty/libyaml/docs/pic/run_all_test.PNG b/thirdparty/libyaml/docs/pic/run_all_test.PNG
deleted file mode 100644
index 25c5ec6e186f688fe5c4b9d2de58f1b0684438fe..0000000000000000000000000000000000000000
Binary files a/thirdparty/libyaml/docs/pic/run_all_test.PNG and /dev/null differ
diff --git a/thirdparty/libyaml/docs/pic/test-version.PNG b/thirdparty/libyaml/docs/pic/test-version.PNG
new file mode 100644
index 0000000000000000000000000000000000000000..18d474d0738ff1895da623d3cabb647cc722916b
Binary files /dev/null and b/thirdparty/libyaml/docs/pic/test-version.PNG differ
diff --git a/thirdparty/libyaml/run-all-tests.sh b/thirdparty/libyaml/run-all-tests.sh
deleted file mode 100755
index 5be55bb62ad34870a66ef40701df9872d81e25ec..0000000000000000000000000000000000000000
--- a/thirdparty/libyaml/run-all-tests.sh
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2023 Huawei Device Co., Ltd.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Contributor: huangminzhong2
-# Maintainer: huangminzhong2
-
-total_tests=13
-passed_tests=0
-
-./test-version
-res=$?
-if [ $res -ne 0 ]
-then
- echo "1/13 test-version .......................... failed"
-else
- echo "1/13 test-version .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./test-reader
-res=$?
-if [ $res -ne 0 ]
-then
- echo "2/13 test-reader .......................... failed"
-else
- echo "2/13 test-reader .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-cat ../examples/anchors.yaml | ./example-deconstructor
-res=$?
-if [ $res -ne 0 ]
-then
- echo "3/13 example-deconstructor .......................... failed"
-else
- echo "3/13 example-deconstructor .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-cat ../examples/anchors.yaml | ./example-deconstructor-alt
-res=$?
-if [ $res -ne 0 ]
-then
- echo "4/13 example-deconstructor-alt .......................... failed"
-else
- echo "4/13 example-deconstructor-alt .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-cat ../examples/anchors.yaml | ./example-reformatter
-res=$?
-if [ $res -ne 0 ]
-then
- echo "5/13 example-reformatter .......................... failed"
-else
- echo "5/13 example-reformatter .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-cat ../examples/anchors.yaml | ./example-reformatter-alt
-res=$?
-if [ $res -ne 0 ]
-then
- echo "6/13 example-reformatter-alt .......................... failed"
-else
- echo "6/13 example-reformatter-alt .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-dumper ../examples/global-tag.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "7/13 run-dumper .......................... failed"
-else
- echo "7/13 run-dumper .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-emitter ../examples/global-tag.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "8/13 run-emitter .......................... failed"
-else
- echo "8/13 run-emitter .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-parser-test-suite ../examples/anchors.yaml | ./run-emitter-test-suite
-res=$?
-if [ $res -ne 0 ]
-then
- echo "9/13 run-emitter-test-suite .......................... failed"
-else
- echo "9/13 run-emitter-test-suite .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-loader ../examples/global-tag.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "10/13 run-loader .......................... failed"
-else
- echo "10/13 run-loader .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-parser ../examples/global-tag.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "11/13 run-parser .......................... failed"
-else
- echo "11/13 run-parser .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-parser-test-suite ../examples/anchors.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "12/13 run-parser-test-suite .......................... failed"
-else
- echo "12/13 run-parser-test-suite .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-./run-scanner ../examples/global-tag.yaml
-res=$?
-if [ $res -ne 0 ]
-then
- echo "13/13 run-scanner .......................... failed"
-else
- echo "13/13 run-scanner .......................... passed"
- passed_tests=`expr $passed_tests + 1`
-fi
-
-test_fail=$((total_tests - passed_tests))
-if [ $total_tests -ne 13 ]
-then
- echo "$total_tests tests passed, $test_fail tests failed"
-else
- echo "100% tests passed, 0 tests failed out of 13"
-fi
diff --git a/thirdparty/libyuv/README.OpenSource b/thirdparty/libyuv/README.OpenSource
index 7167cf0c703f72f94235ec393bdd7a1601715270..6d2344e1e4f68599e03e45744b2e91af1d3dc94f 100644
--- a/thirdparty/libyuv/README.OpenSource
+++ b/thirdparty/libyuv/README.OpenSource
@@ -4,8 +4,17 @@
"License": "BSD 3-Clause License",
"License File": "https://chromium.googlesource.com/libyuv/libyuv/+/c0031cfd95e131c7b11be41d0272455cc63f10f4/LICENSE",
"Version Number": "c0031cf",
- "Owner": "swkec@isoftstone.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://chromium.googlesource.com/libyuv/libyuv/+archive/c0031cfd95e131c7b11be41d0272455cc63f10f4.tar.gz",
"Description": "libyuv is an open-source image processing library that provides various image processing functions, including image format conversion, color space conversion, color adjustment, denoising, defogging, sharpening, and scaling."
+ },
+ {
+ "Name": "googletest",
+ "License": "BSD-3-Clause license",
+ "License File": "https://github.com/google/googletest/blob/main/LICENSE",
+ "Version Number": "v1.13.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
+ "Description": "Google Testing and Mocking Framework"
}
]
diff --git a/thirdparty/libyuv/README_zh.md b/thirdparty/libyuv/README_zh.md
index 89d9eff6df8beb5e8d83057bf6998a44a60e0cfc..34d8409fa8c7f6661a7211911ad13e9efb754405 100644
--- a/thirdparty/libyuv/README_zh.md
+++ b/thirdparty/libyuv/README_zh.md
@@ -1,11 +1,12 @@
# libyuv三方库说明
## 功能简介
libyuv是一个开源的图像处理库,提供了多种图像处理功能,包括图像格式转换、颜色空间转换、颜色调整、去噪、去雾、锐化、缩放等。
+
+## 三方库版本
+- c0031cfd95e131c7b11be41d0272455cc63f10f4
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:c0031cf(该版本为镜像仓版本,官方版本:c0031cfd95e131c7b11be41d0272455cc63f10f4)
-- 当前适配的功能:支持多种图像处理功能,包括图像格式转换、颜色空间转换、颜色调整、去噪、去雾、锐化、缩放等
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libyuv/docs/hap_integrate.md b/thirdparty/libyuv/docs/hap_integrate.md
index a5b19b962832cc00a39dbc86f83a15141c6ccd22..9f16a5dfeaeb509dcf6aaedd9455eb8ec6b1f65e 100644
--- a/thirdparty/libyuv/docs/hap_integrate.md
+++ b/thirdparty/libyuv/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libyuv集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库(需要可以可以访问国外网络的环境)
```
diff --git a/thirdparty/libzip/README_zh.md b/thirdparty/libzip/README_zh.md
index 1ecccf29652001a705711ea42be0e3e93224de74..c0f9667a88a77bc51999d3e525c7c1131c03d256 100644
--- a/thirdparty/libzip/README_zh.md
+++ b/thirdparty/libzip/README_zh.md
@@ -2,11 +2,11 @@
## 功能简介
libzip是一个用于读取、创建和修改zip存档的C库。文件可以从数据缓冲区、文件或直接从其他zip档案复制的压缩数据中添加。
+## 三方库版本
+- 1.9.2
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.9.2
-- 当前适配的功能:读取、创建和修改zip存档功能
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libzip/docs/hap_integrate.md b/thirdparty/libzip/docs/hap_integrate.md
index 18bcc369d16594de23f564f72154657ba082e43c..e34c6fa9249d241e8810bda1a9d4a091d8c4cf3b 100644
--- a/thirdparty/libzip/docs/hap_integrate.md
+++ b/thirdparty/libzip/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# libzip集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/libzmq/HPKBUILD b/thirdparty/libzmq/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..d07a6f89d506c412ee2373fa459994902ffd6726
--- /dev/null
+++ b/thirdparty/libzmq/HPKBUILD
@@ -0,0 +1,97 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: huangminzhong2
+# Maintainer: huangminzhong2
+
+pkgname=libzmq
+pkgver=v4.1.8
+pkgrel=0
+pkgdesc="A library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products."
+url="https://github.com/zeromq/libzmq"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("MPL-2.0")
+depends=()
+makedepends=()
+install=
+source="https://github.com/zeromq/$pkgname/archive/refs/tags/$pkgver.tar.gz"
+downloadpackage=true
+autounpack=true
+patchflag=true
+buildtools="cmake"
+builddir=${pkgname}-${pkgver:1}
+packagename=$builddir.tar.gz
+
+prepare() {
+ if $patchflag
+ then
+ cd $builddir
+ # libzmq_oh_pkg.patch文件的作用如下
+ # 1. test_many_sockets用例测试时会不停的创建文件描述符,直到达到系统上限,当系统资源不足时,源代码未判断errno == ENOMEM这个条件,在鸿蒙系统有的版本会直接报out of memory的错误并结束测试程序
+ # 2. test_pair_ipc和test_reqrep_ipc测试用例需修改/tmp目录为/data/local/tmp目录
+ #3. test_spec_req和test_req_relaxed测试用例在鸿蒙系统,需给70ms以上的时间来完成zmq_socket的创建和连接,以保证请求的正确循环
+ patch -p1 < `pwd`/../libzmq_oh_pkg.patch
+ patchflag=false
+ cd $OLDPWD
+ fi
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ #cmake -DZMQ_HAVE_SOCK_CLOEXEC_EXITCODE=0 -DZMQ_HAVE_SOCK_CLOEXEC_EXITCODE__TRYRUN_OUTPUT="Your_Expected_Output" ...
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \
+ -DZMQ_HAVE_TCP_KEEPINTVL_EXITCODE=FAILED_TO_RUN -DZMQ_HAVE_TCP_KEEPIDLE_EXITCODE=FAILED_TO_RUN \
+ -DZMQ_HAVE_TCP_KEEPCNT_EXITCODE=FAILED_TO_RUN -DZMQ_HAVE_SO_KEEPALIVE_EXITCODE=FAILED_TO_RUN \
+ -DZMQ_HAVE_SOCK_CLOEXEC_EXITCODE=FAILED_TO_RUN -DZMQ_HAVE_SOCK_CLOEXEC_EXITCODE__TRYRUN_OUTPUT="./" \
+ -DZMQ_HAVE_TCP_KEEPCNT_EXITCODE__TRYRUN_OUTPUT="./" -DZMQ_HAVE_TCP_KEEPIDLE_EXITCODE__TRYRUN_OUTPUT="./" \
+ -DZMQ_HAVE_TCP_KEEPINTVL_EXITCODE__TRYRUN_OUTPUT="./" -DZMQ_HAVE_SO_KEEPALIVE_EXITCODE__TRYRUN_OUTPUT="./" \
+ -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ make -C $ARCH-build install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+# 进行测试的准备和说明
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ cd $builddir/$ARCH-build
+
+ # 屏蔽用例
+ # test_abstract_ipc :该用例只用于linux平台测试
+ # test_filter_ipc :检查用户是否属于补充组时,没有找到,系统本身对于组成员分配无法满足测试要求
+ patterns_to_delete=(
+ "test_abstract_ipc"
+ "test_filter_ipc"
+ )
+
+ # 循环遍历数组并执行sed命令
+ cp tests/CTestTestfile.cmake tests/CTestTestfile.cmake.bak
+ for pattern in "${patterns_to_delete[@]}"; do
+ sed -i "/${pattern}\"/{N;d;}" tests/CTestTestfile.cmake
+ done
+
+ cd $OLDPWD
+}
+
+# 清理环境
+cleanbuild() {
+ rm -rf ${PWD}/$builddir #${PWD}/$packagename
+}
diff --git a/thirdparty/libzmq/HPKCHECK b/thirdparty/libzmq/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..aed5c4d32504f31b6a7887548617d201de613bc5
--- /dev/null
+++ b/thirdparty/libzmq/HPKCHECK
@@ -0,0 +1,32 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: huangminzhong2 ,zhuangkun
+# Maintainer: huangminzhong2
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+openharmonycheck() {
+ res=0
+ cd $builddir/$ARCH-build
+ ctest >> $logfile 2>&1
+ res=$?
+ if [ $res -ne 0 ];then
+ mkdir ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ fi
+
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/libzmq/OAT.xml b/thirdparty/libzmq/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c910b32a0f5cab1461a8807c1f474d998359e04
--- /dev/null
+++ b/thirdparty/libzmq/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/thirdparty/libzmq/README.OpenSource b/thirdparty/libzmq/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..88ec53feacc4463704f282b8e8cb822bc1bdfb4c
--- /dev/null
+++ b/thirdparty/libzmq/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "libzmq",
+ "License": "MPL-2.0",
+ "License File": "https://github.com/zeromq/libzmq/blob/master/LICENSE",
+ "Version Number": "v4.8.1",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/zeromq/libzmq",
+ "Description": "A library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products."
+ }
+]
diff --git a/thirdparty/libzmq/README_zh.md b/thirdparty/libzmq/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..6dfc5a9590948ea7758c6c2b51d4c23f1ecb542c
--- /dev/null
+++ b/thirdparty/libzmq/README_zh.md
@@ -0,0 +1,12 @@
+# zeromq三方库说明
+## 功能简介
+ZeroMQ轻量级消息传递内核是一个库,它扩展了标准套接字接口,使用传统上由专门的消息传递中间件产品提供的功能。
+
+## 三方库版本
+- v4.8.1
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/libzmq/SHA512SUM b/thirdparty/libzmq/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..7679af77a1c04a9f2e3544b701eb747f53b7efa8
--- /dev/null
+++ b/thirdparty/libzmq/SHA512SUM
@@ -0,0 +1 @@
+ead6eed1c48344105468ca09c03572135fbf1ec98e9c940c4dcb7ba23fc0ddbfbfac490f3cd3445fe743a65b8ed28c2d7d323baaff3ca42e24eb0e444fac137f libzmq-4.1.8.tar.gz
diff --git a/thirdparty/libzmq/docs/hap_integrate.md b/thirdparty/libzmq/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..9e3a6924bb46cb93cfa0a0f56272d14e3a8996ce
--- /dev/null
+++ b/thirdparty/libzmq/docs/hap_integrate.md
@@ -0,0 +1,72 @@
+# libzmq集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+- 三方库目录结构
+ ```shell
+ tpc_c_cplusplus/thirdparty/libzmq #三方库libzmq的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+- 在lycium目录下编译三方库
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+ ```shell
+ cd lycium
+ ./build.sh libzmq
+ ```
+- 三方库头文件及生成的库
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+ ```shell
+ libzmq/arm64-v8a libzmq/armeabi-v7a
+ ```
+- [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下;
+- 在IDE的entry目录下新增libs目录,将编译生成的.so文件拷贝到该目录下。如下图所示:
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libzmq/${OHOS_ARCH}/lib/libzmq.so)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libzmq/${OHOS_ARCH}/include/)
+ ```
+
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+```
+ cd /data/tpc_c_cplusplus/thirdparty/libzmq/libzmq-4.8.1/armeabi-v7a-build/
+ ctest
+```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [libzmq三方库地址](https://github.com/zeromq/libzmq)
\ No newline at end of file
diff --git a/thirdparty/libzmq/docs/pic/libzmq-dev.png b/thirdparty/libzmq/docs/pic/libzmq-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..d8ce037f13d23efd2b206ee423d2592ed51c24f2
Binary files /dev/null and b/thirdparty/libzmq/docs/pic/libzmq-dev.png differ
diff --git a/thirdparty/libzmq/docs/pic/test-cmd-ret.png b/thirdparty/libzmq/docs/pic/test-cmd-ret.png
new file mode 100644
index 0000000000000000000000000000000000000000..32d03e3fd0fe197b64ebba161ab83e4dfeae98d7
Binary files /dev/null and b/thirdparty/libzmq/docs/pic/test-cmd-ret.png differ
diff --git a/thirdparty/libzmq/libzmq_oh_pkg.patch b/thirdparty/libzmq/libzmq_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e2211319fb505e0ca61c2413f84486889b62ffcc
--- /dev/null
+++ b/thirdparty/libzmq/libzmq_oh_pkg.patch
@@ -0,0 +1,72 @@
+diff -urN libzmq-4.1.8_old/src/signaler.cpp libzmq-4.1.8/src/signaler.cpp
+--- libzmq-4.1.8_old/src/signaler.cpp 2020-09-02 21:49:51.000000000 +0800
++++ libzmq-4.1.8/src/signaler.cpp 2024-08-06 16:44:10.109644074 +0800
+@@ -321,7 +321,7 @@
+ #if defined ZMQ_HAVE_EVENTFD
+ fd_t fd = eventfd (0, 0);
+ if (fd == -1) {
+- errno_assert (errno == ENFILE || errno == EMFILE);
++ errno_assert (errno == ENFILE || errno == EMFILE || errno == ENOMEM);
+ *w_ = *r_ = -1;
+ return -1;
+ }
+diff -urN libzmq-4.1.8_old/tests/test_pair_ipc.cpp libzmq-4.1.8/tests/test_pair_ipc.cpp
+--- libzmq-4.1.8_old/tests/test_pair_ipc.cpp 2020-09-02 21:49:51.000000000 +0800
++++ libzmq-4.1.8/tests/test_pair_ipc.cpp 2024-08-06 16:37:20.819150745 +0800
+@@ -37,12 +37,12 @@
+
+ void *sb = zmq_socket (ctx, ZMQ_PAIR);
+ assert (sb);
+- int rc = zmq_bind (sb, "ipc:///tmp/tester");
++ int rc = zmq_bind (sb, "ipc:///data/local/tmp/tester");
+ assert (rc == 0);
+
+ void *sc = zmq_socket (ctx, ZMQ_PAIR);
+ assert (sc);
+- rc = zmq_connect (sc, "ipc:///tmp/tester");
++ rc = zmq_connect (sc, "ipc:///data/local/tmp/tester");
+ assert (rc == 0);
+
+ bounce (sb, sc);
+diff -urN libzmq-4.1.8_old/tests/test_req_relaxed.cpp libzmq-4.1.8/tests/test_req_relaxed.cpp
+--- libzmq-4.1.8_old/tests/test_req_relaxed.cpp 2020-09-02 21:49:51.000000000 +0800
++++ libzmq-4.1.8/tests/test_req_relaxed.cpp 2024-08-06 16:21:50.245261053 +0800
+@@ -64,7 +64,7 @@
+ // We have to give the connects time to finish otherwise the requests
+ // will not properly round-robin. We could alternatively connect the
+ // REQ sockets to the REP sockets.
+- msleep (SETTLE_TIME);
++ msleep (SETTLE_TIME * 10);
+
+ // Case 1: Second send() before a reply arrives in a pipe.
+
+diff -urN libzmq-4.1.8_old/tests/test_reqrep_ipc.cpp libzmq-4.1.8/tests/test_reqrep_ipc.cpp
+--- libzmq-4.1.8_old/tests/test_reqrep_ipc.cpp 2020-09-02 21:49:51.000000000 +0800
++++ libzmq-4.1.8/tests/test_reqrep_ipc.cpp 2024-08-06 16:37:36.814645549 +0800
+@@ -37,12 +37,12 @@
+
+ void *sb = zmq_socket (ctx, ZMQ_REP);
+ assert (sb);
+- int rc = zmq_bind (sb, "ipc:///tmp/tester");
++ int rc = zmq_bind (sb, "ipc:///data/local/tmp/tester");
+ assert (rc == 0);
+
+ void *sc = zmq_socket (ctx, ZMQ_REQ);
+ assert (sc);
+- rc = zmq_connect (sc, "ipc:///tmp/tester");
++ rc = zmq_connect (sc, "ipc:///data/local/tmp/tester");
+ assert (rc == 0);
+
+ bounce (sb, sc);
+diff -urN libzmq-4.1.8_old/tests/test_spec_req.cpp libzmq-4.1.8/tests/test_spec_req.cpp
+--- libzmq-4.1.8_old/tests/test_spec_req.cpp 2020-09-02 21:49:51.000000000 +0800
++++ libzmq-4.1.8/tests/test_spec_req.cpp 2024-08-06 16:21:30.584823410 +0800
+@@ -56,7 +56,7 @@
+ // We have to give the connects time to finish otherwise the requests
+ // will not properly round-robin. We could alternatively connect the
+ // REQ sockets to the REP sockets.
+- msleep (SETTLE_TIME);
++ msleep (SETTLE_TIME * 10);
+
+ // Send our peer-replies, and expect every REP it used once in order
+ for (size_t peer = 0; peer < services; peer++) {
diff --git a/thirdparty/linux-pam/HPKBUILD b/thirdparty/linux-pam/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..58c1290da6dbf8a2a1df0fe21aedafab35c88113
--- /dev/null
+++ b/thirdparty/linux-pam/HPKBUILD
@@ -0,0 +1,144 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: huangminzhong2 ,zhuangkun
+# Maintainer: huangminzhong2
+
+pkgname=linux-pam
+pkgver=8562cb1b951e7bd807af6b43d85c71cedd7b10d7
+pkgrel=0
+pkgdesc="Linux-PAM offers flexible and scalable authentication solutions for Linux, allowing admins to configure authentication policies across apps via config files."
+url="https://github.com/linux-pam"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("BSD-3-Clause")
+depends=()
+makedepends=()
+
+source=https://github.com/linux-pam/linux-pam.git
+
+autounpack=false
+downloadpackage=false
+buildtools="configure"
+builddir=$pkgname-${pkgver}
+packagename=
+
+source envset.sh
+autogenflags=true
+patchflag=true
+cloneflag=true
+host=
+
+prepare() {
+ if $cloneflag
+ then
+ mkdir -p $builddir
+ git clone -b master $source $builddir > $publicbuildlog 2>&1
+ if [ $? -ne 0 ]
+ then
+ return -1
+ fi
+
+ cd $builddir
+ git reset --hard $pkgver >> $publicbuildlog 2>&1
+ if [ $? -ne 0 ]
+ then
+ return -2
+ fi
+
+ cd $OLDPWD
+ cloneflag=false
+ fi
+
+ # 注释OHOS不支持的系统函数
+ if $patchflag
+ then
+ cd $builddir
+ patch -p1 < `pwd`/../linux-pam_oh_pkg.patch >> $publicbuildlog 2>&1
+ patchflag=false
+ cd $OLDPWD
+ fi
+
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ setarm32ENV
+ host=arm-linux
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ setarm64ENV
+ host=aarch64-linux
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+
+ if $autogenflags
+ then
+ cd $builddir
+ ./autogen.sh >> $publicbuildlog 2>&1
+ cd ${OLDPWD}
+ fi
+
+ cp -rf $builddir $builddir-$ARCH-build
+}
+
+build() {
+ cd $builddir-$ARCH-build
+ CPPFLAGS="-DHELPER_COMPILE_R=1" ./configure "$@" --disable-doc --host=$host > $buildlog 2>&1
+ $MAKE >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir-$ARCH-build
+ $MAKE install >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ cd $builddir-$ARCH-build
+ # 注释掉测试部分
+ sed -i.bak 's|$(MAKE) $(AM_MAKEFLAGS) check-TESTS|# $(MAKE) $(AM_MAKEFLAGS) check-TESTS|g' tests/Makefile
+ $MAKE check >> $buildlog 2>&1
+ # 注释掉编译部分
+ sed -i '/^all: all-am$/,/^\t@:$/s/^/#/' tests/Makefile
+ sed -i 's|# $(MAKE) $(AM_MAKEFLAGS) check-TESTS|$(MAKE) $(AM_MAKEFLAGS) check-TESTS|g' tests/Makefile
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+recoverpkgbuildenv() {
+ unset host
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ unsetarm32ENV
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ unsetarm64ENV
+ else
+ echo "${ARCH} not support"
+ return -1
+ fi
+}
+
+# 清理环境
+cleanbuild(){
+ rm -rf $builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build
+}
+
+
diff --git a/thirdparty/linux-pam/HPKCHECK b/thirdparty/linux-pam/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..f47462bf2ae79887fa56ceb3d7f922c27ba367dd
--- /dev/null
+++ b/thirdparty/linux-pam/HPKCHECK
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: huangminzhong2 ,zhuangkun
+# Maintainer: huangminzhong2
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ # 测试需要pam.conf文件
+ cd ${builddir}
+ cp ./conf/pam.conf /data
+ cd $OLDPWD
+
+ res=0
+ cd ${builddir}-${ARCH}-build/tests
+ make check-TESTS > ${logfile} 2>&1
+ res=$?
+ cd $OLDPWD
+ rm -f /data/pam.conf
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/linux-pam/OAT.xml b/thirdparty/linux-pam/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/linux-pam/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/linux-pam/README.OpenSource b/thirdparty/linux-pam/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..520d8bb1399ee9831f8c4b434b373cef810b1dd5
--- /dev/null
+++ b/thirdparty/linux-pam/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "linux-pam",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/linux-pam/linux-pam/blob/master/COPYING",
+ "Version Number": "8562cb1b951e7bd807af6b43d85c71cedd7b10d7",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/linux-pam/linux-pam",
+ "Description": "Linux-PAM is a set of shared libraries that allow local system administrators to choose the program authentication method at will."
+ }
+]
diff --git a/thirdparty/linux-pam/README_zh.md b/thirdparty/linux-pam/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..8beadf3f041fe3999a8b7068ba10752f366bb06c
--- /dev/null
+++ b/thirdparty/linux-pam/README_zh.md
@@ -0,0 +1,12 @@
+# linux-pam 三方库说明
+## 功能简介
+Linux-PAM是一套允许本地系统管理员随意选择程序认证方式的共享库。它通过提供一套灵活的验证机制,使得系统管理员可以在不重新编译应用程序的情况下,轻松切换或升级认证机制。
+
+## 三方库版本
+- 8562cb1b951e7bd807af6b43d85c71cedd7b10d7
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/linux-pam/SHA512SUM b/thirdparty/linux-pam/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..d25d4deef31b39df6d3f84ce96f9c348b75ecc2a
--- /dev/null
+++ b/thirdparty/linux-pam/SHA512SUM
@@ -0,0 +1 @@
+4e4caef61fbc6f310feff8dd728577702c8fb7d8bee2ff6c35a19f423495d845a55dbe3f0fa3542b114f4bd77954e0f7f8af9e35a21736ac86b1ad4b09eff785 linux-pam-1.6.1.zip
diff --git a/thirdparty/linux-pam/docs/hap_integrate.md b/thirdparty/linux-pam/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..52fcce729115e6bca394e562c43ae02014db1405
--- /dev/null
+++ b/thirdparty/linux-pam/docs/hap_integrate.md
@@ -0,0 +1,86 @@
+# linux-pam集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/linux-pam #三方库linux-pam的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh linux-pam
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ linux-pam/arm64-v8a linux-pam/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下;
+- 在IDE的entry目录下新增libs目录,将编译生成的.so文件拷贝到该目录下,若没有so文件则无需新增libs目录。如下图所示:
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/linux-pam/${OHOS_ARCH}/lib/libpam.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/linux-pam/${OHOS_ARCH}/lib/libpam_misc.so)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/linux-pam/${OHOS_ARCH}/lib/libpamc.so)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/linux-pam/${OHOS_ARCH}/include/)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+
+ ```
+ cd /data/tpc_c_cplusplus/thirdparty/linux-pam/linux-pam-8562cb1b951e7bd807af6b43d85c71cedd7b10d7-armeabi-v7a-build/tests
+ cp ../conf/pam.conf /data
+ make check-TESTS
+ rm -f /data/pam.conf
+ ```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [linux-pam三方库地址](https://github.com/linux-pam)
diff --git a/thirdparty/linux-pam/docs/pic/linux-pam-dev.png b/thirdparty/linux-pam/docs/pic/linux-pam-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..9dd878fe88d9745f6fb1d5fed99f033865f86d8a
Binary files /dev/null and b/thirdparty/linux-pam/docs/pic/linux-pam-dev.png differ
diff --git a/thirdparty/linux-pam/docs/pic/test-cmd-ret.png b/thirdparty/linux-pam/docs/pic/test-cmd-ret.png
new file mode 100644
index 0000000000000000000000000000000000000000..85d08f0b09daaca492b57513d8c9f0b82c1a80c2
Binary files /dev/null and b/thirdparty/linux-pam/docs/pic/test-cmd-ret.png differ
diff --git a/thirdparty/linux-pam/linux-pam_oh_pkg.patch b/thirdparty/linux-pam/linux-pam_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..3eeee546c5a0bf5bbed45cd8e81dccc3ec30e75e
--- /dev/null
+++ b/thirdparty/linux-pam/linux-pam_oh_pkg.patch
@@ -0,0 +1,72 @@
+From 5185a858acedb087c798b0300e8e477600d1b29a Mon Sep 17 00:00:00 2001
+From: xiong-qiushi
+Date: Thu, 1 Aug 2024 18:07:49 +0800
+Subject: [PATCH 1/1] patch
+
+---
+ Makefile.am | 2 +-
+ configure.ac | 4 ++--
+ libpam/pam_modutil_getspnam.c | 2 +-
+ libpam/pam_private.h | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8a2e31dd..e9b7c38d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4,7 +4,7 @@
+
+ AUTOMAKE_OPTIONS = 1.9 gnu dist-xz no-dist-gzip check-news
+
+-SUBDIRS = libpam_internal libpam tests libpamc libpam_misc modules po conf \
++SUBDIRS = libpam_internal libpam tests libpamc libpam_misc po conf \
+ xtests
+
+ if HAVE_DOC
+diff --git a/configure.ac b/configure.ac
+index fc5cc085..bb28e03f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -313,11 +313,11 @@ if test x"$enable_pamlocking" = "xyes"; then
+ fi
+
+ AC_ARG_ENABLE(read-both-confs,
+- AS_HELP_STRING([--enable-read-both-confs],[read both /etc/pam.d and /etc/pam.conf files]))
++ AS_HELP_STRING([--enable-read-both-confs],[read both /etc/pam.d and /data/tpc_c_cplusplus/thirdparty/linux-pam/pam.conf files]))
+
+ if test x"$enable_read_both_confs" = "xyes"; then
+ AC_DEFINE([PAM_READ_BOTH_CONFS],,
+- [read both /etc/pam.d and /etc/pam.conf files])
++ [read both /etc/pam.d and /data/tpc_c_cplusplus/thirdparty/linux-pam/pam.conf files])
+ fi
+
+ AC_ARG_ENABLE([lckpwdf],
+diff --git a/libpam/pam_modutil_getspnam.c b/libpam/pam_modutil_getspnam.c
+index 8b48db90..c6756b06 100644
+--- a/libpam/pam_modutil_getspnam.c
++++ b/libpam/pam_modutil_getspnam.c
+@@ -119,7 +119,7 @@ pam_modutil_getspnam(pam_handle_t *pamh, const char *user)
+ * getspnam(). So, we use the standard libc function.
+ */
+
+- return getspnam(user);
++// return getspnam(user);
+
+ #endif /* def HAVE_GETSPNAM_R */
+ }
+diff --git a/libpam/pam_private.h b/libpam/pam_private.h
+index 77dc5a69..0880bf9c 100644
+--- a/libpam/pam_private.h
++++ b/libpam/pam_private.h
+@@ -25,7 +25,7 @@
+
+ /* the Linux-PAM configuration file */
+
+-#define PAM_CONFIG "/etc/pam.conf"
++#define PAM_CONFIG "/data/pam.conf"
+ #define PAM_CONFIG_D "/etc/pam.d"
+ #define PAM_CONFIG_DF "/etc/pam.d/%s"
+ #define PAM_CONFIG_DIST_D "/usr/lib/pam.d"
+--
+2.34.1
+
diff --git a/thirdparty/live555/README_zh.md b/thirdparty/live555/README_zh.md
index 4063cd8d01efd002779a91b4dbdc5906fcb47e21..a981fbf1b3b60e34c991d670151c570e6849796e 100644
--- a/thirdparty/live555/README_zh.md
+++ b/thirdparty/live555/README_zh.md
@@ -2,13 +2,13 @@
## 功能简介
- 互联网流媒体、无线和组播技术、服务和标准
+互联网流媒体、无线和组播技术、服务和标准
+
+## 三方库版本
+- 2c92a57ca04b83b2038ab2ab701d05a54be06a85
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:master,commiterID: 2c92a57ca04b83b2038ab2ab701d05a54be06a85
-- 当前适配的功能:互联网流媒体、无线和组播技术、服务和标准
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/lodepng/README_zh.md b/thirdparty/lodepng/README_zh.md
index 1f55aa6d7628c2efb634af8b4958053c51f8a601..598bcdefb513a94b8434afb22a348a4cabbfb96b 100644
--- a/thirdparty/lodepng/README_zh.md
+++ b/thirdparty/lodepng/README_zh.md
@@ -1,11 +1,12 @@
# lodepng三方库说明
## 功能简介
lodepng是一个PNG编解码库
+
+## 三方库版本
+- v2.1.0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.1.0
-- 当前适配的功能:提供PNG编解码能力
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/log4cplus/README_zh.md b/thirdparty/log4cplus/README_zh.md
index 8fd19c0b3468329501ff7007f530faa8ad0f06ce..d5ad8ec41c762374ced0b5a08f0330bcdc6abfb9 100755
--- a/thirdparty/log4cplus/README_zh.md
+++ b/thirdparty/log4cplus/README_zh.md
@@ -4,12 +4,14 @@
log4cplus是一个简单易用的C++日志记录API,它对日志管理和配置提供了线程安全、灵活和任意粒度的控制.
-## 使用约束
+## 三方库版本
+- REL_2_1_0
+
+## 已适配功能
+- 支持输出日志并将日志保存到本地
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:REL_2_1_0
-- 当前适配的功能:支持输出日志并将日志保存到本地
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
diff --git a/thirdparty/log4cplus/docs/hap_integrate.md b/thirdparty/log4cplus/docs/hap_integrate.md
index 5b3cc6348192bfd240570f637cf367bcb38b39b5..6c1730706b4b78a85863db0b8874e2eb91970f54 100755
--- a/thirdparty/log4cplus/docs/hap_integrate.md
+++ b/thirdparty/log4cplus/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/lpeg/README.OpenSource b/thirdparty/lpeg/README.OpenSource
index 0fa0a2eb8425369ec11e33adc7aab94feee00998..85d5d2f24f85235ad96e481fbc5779faf1933dc1 100644
--- a/thirdparty/lpeg/README.OpenSource
+++ b/thirdparty/lpeg/README.OpenSource
@@ -1,11 +1,20 @@
[
{
"Name": "lpeg",
- "License": "MIT license",
- "License File": "LICENSES",
+ "License": "MIT",
+ "License File": "https://www.inf.puc-rio.br/~roberto/lpeg/#license",
"Version Number": "master",
- "Owner": "qiandinge@isoftstone.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://github.com/luvit/lpeg/archive/refs/heads/master.zip",
"Description": "LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs)"
+ },
+ {
+ "Name": "LuaJIT",
+ "License": "MIT",
+ "License File": "https://github.com/LuaJIT/LuaJIT/blob/v2.1/COPYRIGHT",
+ "Version Number": "2.1.0-beta3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz",
+ "Description": "A Just-In-Time Compiler for Lua."
}
]
\ No newline at end of file
diff --git a/thirdparty/lpeg/README_zh.md b/thirdparty/lpeg/README_zh.md
index f301586e76b36ed1d40b524ff3f9cac82bef1e9b..ed61d6d1f9a0093caf0642340746c6fe31f80fe1 100644
--- a/thirdparty/lpeg/README_zh.md
+++ b/thirdparty/lpeg/README_zh.md
@@ -1,11 +1,12 @@
# lpeg三方库说明
## 功能简介
LPEG是一个供lua使用的基于 Parsing Expression Grammars 的模式匹配库
+
+## 三方库版本
+- fda374f3bbac50653bdeba7404d63e13972e6210
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:master
-- 当前适配的功能:LPEG是一个供lua使用的基于 Parsing Expression Grammars 的模式匹配库
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/lpeg/docs/hap_ingtegrate.md b/thirdparty/lpeg/docs/hap_ingtegrate.md
index b7e80ffb5c3301fe562fae357bb160c780993964..ee898db2043336720aec0655b51abd059491e052 100644
--- a/thirdparty/lpeg/docs/hap_ingtegrate.md
+++ b/thirdparty/lpeg/docs/hap_ingtegrate.md
@@ -3,13 +3,7 @@
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../tools/README.md#编译环境准备)
-- [准备三方库测试环境](../../../tools/README.md#ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/lua-amf3/README.OpenSource b/thirdparty/lua-amf3/README.OpenSource
index 12d6a751126a6cbbc6d9eaaf16550988e56279a9..1b9d181f04955c2fd543cbcd2eb16945a23b7b68 100644
--- a/thirdparty/lua-amf3/README.OpenSource
+++ b/thirdparty/lua-amf3/README.OpenSource
@@ -1,11 +1,20 @@
[
{
"Name": "lua-amf3",
- "License": "MIT License",
- "License File": "LICENSE",
+ "License": "MIT",
+ "License File": "https://github.com/neoxic/lua-amf3/blob/master/LICENSE",
"Version Number": "2.0.5",
- "Owner": "chenxu.unix@gmail.com",
- "Upstream URL": "https://github.com/neoxic/lua-amf3.git",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/neoxic/lua-amf3/archive/refs/tags/2.0.5.zip",
"Description": "lua-amf3 provides fast AMF3 encoding/decoding routines for Lua."
+ },
+ {
+ "Name": "LuaJIT",
+ "License": "MIT",
+ "License File": "https://github.com/LuaJIT/LuaJIT/blob/v2.1/COPYRIGHT",
+ "Version Number": "2.1.0-beta3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz",
+ "Description": "A Just-In-Time Compiler for Lua."
}
]
diff --git a/thirdparty/lua-amf3/README_zh.md b/thirdparty/lua-amf3/README_zh.md
index c6a2023fb48ace61fc1d2204f90802add7d9b9b7..f0c37f9c87a70d5fefd764c7cd25b0d60bc3ca0a 100644
--- a/thirdparty/lua-amf3/README_zh.md
+++ b/thirdparty/lua-amf3/README_zh.md
@@ -1,11 +1,15 @@
# lua-amf3三方库说明
## 功能简介
lua-amf3为lua提供AMF二进制格式数据编解码功能。
+
+## 三方库版本
+- 2.0.5
+
+## 已适配功能
+- 读取解析xml
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:2.0.5
-- 当前适配的功能:读取解析xml
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/lua-amf3/docs/hap_integrate.md b/thirdparty/lua-amf3/docs/hap_integrate.md
index 36d5dfa4967486d3e8939781482b7e208ddce40a..d7def63d660003d1e71ea2c2494603bf4b33e8cf 100644
--- a/thirdparty/lua-amf3/docs/hap_integrate.md
+++ b/thirdparty/lua-amf3/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# lua-amf3集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/lua-cjson/HPKCHECK b/thirdparty/lua-cjson/HPKCHECK
index 839191e01e1d235b5bc88e32438448bdc776e910..97858496e33c35afd2e50604942b42de47de8523 100644
--- a/thirdparty/lua-cjson/HPKCHECK
+++ b/thirdparty/lua-cjson/HPKCHECK
@@ -23,19 +23,19 @@ openharmonycheck() {
cd ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib
# 使用lua-5.4.6完成测试
- mkdir -p /usr/local/lib/lua/5.4/cjson
- cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/lua/cjson/util.lua /usr/local/lib/lua/5.4/cjson/
- cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/*.so /usr/local/lib/lua/5.4/
+ mkdir -p /data/local/lib/lua/5.4/cjson
+ cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/lua/cjson/util.lua /data/local/lib/lua/5.4/cjson/
+ cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/*.so /data/local/lib/lua/5.4/
cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/tests/octets-escaped.dat .
# Decode all UTF-16 escapes测试项需要utf8.dat,该文件是通过genutf8.pl脚本生成的,如果不支持Perl脚本则需要手动上传资源文件
${LYCIUM_ROOT}/../lycium/usr/lua-cjson/${ARCH}/ib/tests/genutf8.pl
cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/tests/utf8.dat .
-
+ export LUA_PATH="/data/local/lib/lua/5.4/?.lua;;"
+ export LUA_CPATH="/data/local/lib/lua/5.4/?.so;;"
${LYCIUM_ROOT}/../lycium/usr/lua/${ARCH}/bin/lua \
${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/tests/test.lua > ${logfile} 2>&1
res=$?
- rm -rf /usr/local/lib
rm -rf octets-escaped.dat
rm -rf utf8.dat
cd $OLDPWD
diff --git a/thirdparty/lua-cjson/README.OpenSource b/thirdparty/lua-cjson/README.OpenSource
index b6e6e35870a1cc89f000da40aa7ebf36e7f16103..6499e85e94daffc3c5b4f2c4cc8022a6660a3792 100644
--- a/thirdparty/lua-cjson/README.OpenSource
+++ b/thirdparty/lua-cjson/README.OpenSource
@@ -1,11 +1,20 @@
[
{
"Name": "lua-cjson",
- "License": "MIT license",
- "License File": "LICENSE",
+ "License": "MIT",
+ "License File": "https://github.com/mpx/lua-cjson/blob/2.1.0/LICENSE",
"Version Number": "v2.1.0",
"Owner": "xiafeng@huawei.com",
- "Upstream URL": "https://github.com/mpx/lua-cjson",
+ "Upstream URL": "https://github.com/mpx/lua-cjson/archive/refs/tags/2.1.0.zip",
"Description": "Lua CJSON is a fast JSON encoding/parsing module for Lua."
+ },
+ {
+ "Name": "lua",
+ "License": "MIT",
+ "License File": "https://www.lua.org/license.html",
+ "Version Number": "v5.4.6",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://www.lua.org/ftp/lua-5.4.6.tar.gz",
+ "Description": "Lua is a powerful, efficient, lightweight, embeddable scripting language."
}
]
\ No newline at end of file
diff --git a/thirdparty/lua-cjson/README_zh.md b/thirdparty/lua-cjson/README_zh.md
index 98dab113a42c10074c5754689daf031c1857370e..1e3191c0baaac79c1515551cfaaf8864fbc6b5b2 100644
--- a/thirdparty/lua-cjson/README_zh.md
+++ b/thirdparty/lua-cjson/README_zh.md
@@ -1,11 +1,15 @@
# lua-cjson三方库说明
## 功能简介
lua-cjson用于完成Lua值与Json值的相互转换(编码及解码)
+
+## 三方库版本
+- v2.1.0
+
+## 已适配功能
+- 支持Lua值与Json值的相互转换,lua-cjson要求编码格式为UTF8,不支持UTF-16和UTF-32
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v2.1.0
-- 当前适配的功能:支持Lua值与Json值的相互转换,lua-cjson要求编码格式为UTF8,不支持UTF-16和UTF-32
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/lua/README.OpenSource b/thirdparty/lua/README.OpenSource
index 7ee6d8f4820ccd924917948bb006cb5b56833950..62517444119f9bdc006f09c1ddb6b58c4cd906e9 100644
--- a/thirdparty/lua/README.OpenSource
+++ b/thirdparty/lua/README.OpenSource
@@ -1,11 +1,11 @@
[
{
"Name": "lua",
- "License": "MIT license",
- "License File": "readme.html",
+ "License": "MIT",
+ "License File": "https://www.lua.org/license.html",
"Version Number": "v5.4.6",
"Owner": "xiafeng@huawei.com",
- "Upstream URL": "https://www.lua.org",
+ "Upstream URL": "https://www.lua.org/ftp/lua-5.4.6.tar.gz",
"Description": "Lua is a powerful, efficient, lightweight, embeddable scripting language."
}
]
\ No newline at end of file
diff --git a/thirdparty/lua/README_zh.md b/thirdparty/lua/README_zh.md
index 9ee3ab768eff09b0aced7c78f58fdacd01cce222..a3c104edc8cc22991f557915e6abeea7d8cd2edb 100644
--- a/thirdparty/lua/README_zh.md
+++ b/thirdparty/lua/README_zh.md
@@ -1,11 +1,12 @@
# lua三方库说明
## 功能简介
Lua是一种强大、高效、轻量级、可嵌入的脚本语言。它支持过程编程、面向对象编程、函数式编程、数据驱动编程和数据描述
+
+## 三方库版本
+- v5.4.6
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:v5.4.6
-- 当前适配的功能:支持过程编程、面向对象编程、函数式编程、数据驱动编程和数据描述
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/lunasvg/README_zh.md b/thirdparty/lunasvg/README_zh.md
index 1e5fc765897c752ed54a969370d015deaaaee1da..9e589900c7280a83eb2dd9884aa0382c1637261c 100644
--- a/thirdparty/lunasvg/README_zh.md
+++ b/thirdparty/lunasvg/README_zh.md
@@ -1,9 +1,12 @@
# lunasvg 三方库说明
## 功能简介
lunasvg 用于创建,设置动画,操作和渲染SVG文件
+
+## 三方库版本
+- 2.3.9
+
## 使用约束
-- SDK版本:ohos_sdk_linux 4.1.3.401
-- 三方库版本:2.3.9
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/luv/HPKCHECK b/thirdparty/luv/HPKCHECK
index 02cbbe289001d276471f3d00f9a15a7820152f4c..09e4e8c5d5128082fae20e8b3eea4497f4b84e2a 100644
--- a/thirdparty/luv/HPKCHECK
+++ b/thirdparty/luv/HPKCHECK
@@ -20,15 +20,16 @@ logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_
openharmonycheck() {
res=0
cd $builddir
- mkdir /usr/local/lib -p
- cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/*.so* /usr/local/lib
- cp ${LYCIUM_ROOT}/../lycium/usr/libuv/${ARCH}/lib/*.so* /usr/local/lib
- cp ${LYCIUM_ROOT}/../lycium/usr/LuaJIT/${ARCH}/lib/*.so* /usr/local/lib
- mkdir /usr/local/lib/lua/5.1/ -p
- ln /usr/local/lib/libluv.so.1 /usr/local/lib/lua/5.1/luv.so
+ mkdir /data/local/lib -p
+ cp ${LYCIUM_ROOT}/../lycium/usr/${pkgname}/${ARCH}/lib/*.so* /data/local/lib
+ cp ${LYCIUM_ROOT}/../lycium/usr/libuv/${ARCH}/lib/*.so* /data/local/lib
+ cp ${LYCIUM_ROOT}/../lycium/usr/LuaJIT/${ARCH}/lib/*.so* /data/local/lib
+ mkdir /data/local/lib/lua/5.1/ -p
+ ln /data/local/lib/libluv.so.1 /data/local/lib/lua/5.1/luv.so
+ export LUA_CPATH="/data/local/lib/lua/5.1/?.so;;"
${LYCIUM_ROOT}/../lycium/usr/LuaJIT/${ARCH}/bin/luajit-2.1.0-beta3 tests/run.lua > ${logfile} 2>&1
res=$?
- rm -rf /usr/local/lib
+ #rm -rf /data/local/lib
cd $OLDPWD
return $res
-}
\ No newline at end of file
+}
diff --git a/thirdparty/luv/README.OpenSource b/thirdparty/luv/README.OpenSource
index d8d911f5d817b9ff3298ddf37b5b992b0609b98d..80243c0e2c4578bea8f7da1ed332b08a48349da8 100644
--- a/thirdparty/luv/README.OpenSource
+++ b/thirdparty/luv/README.OpenSource
@@ -16,5 +16,14 @@
"Owner": "xiafeng@huawei.com",
"Upstream URL": "https://luajit.org/download/$pkgname-$pkgver.tar.gz",
"Description": "A module that maps between Lua and XML without much ado."
+ },
+ {
+ "Name": "libuv",
+ "License": "MIT license and CC-BY-4.0 license",
+ "License File": ["https://github.com/libuv/libuv/blob/v1.x/LICENSE","https://github.com/libuv/libuv/blob/v1.x/LICENSE-extra","https://github.com/libuv/libuv/blob/v1.x/LICENSE-docs"],
+ "Version Number": "v1.44.2",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libuv/libuv/archive/refs/tags/v1.44.2.tar.gz",
+ "Description": "Libuv is an event-driven, cross-platform I/O library for asynchronous programming."
}
]
diff --git a/thirdparty/luv/README_zh.md b/thirdparty/luv/README_zh.md
index 72c848e269ce8a9c55890ef20a11cfa5893a51e1..2e8a46f4c8ac3ff868b2b5fd37c6443d80481561 100644
--- a/thirdparty/luv/README_zh.md
+++ b/thirdparty/luv/README_zh.md
@@ -1,11 +1,12 @@
# luv三方库说明
## 功能简介
luv是一个用于lua的libuv裸绑定的库
+
+## 三方库版本
+- 1.45.0-0
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.45.0-0
-- 当前适配的功能:使libuv可用于lua脚本。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/luv/docs/hap_ingtegrate.md b/thirdparty/luv/docs/hap_ingtegrate.md
index 55c94416678adc52b51b75251575326d951a5dbb..47b6319dae1b70d22b72c0d1dbb79f47791a1464 100644
--- a/thirdparty/luv/docs/hap_ingtegrate.md
+++ b/thirdparty/luv/docs/hap_ingtegrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/lzo/README_zh.md b/thirdparty/lzo/README_zh.md
index 9344ceddd9e7844462ea382460a45270b13412e3..80533ee3b1ba0b128ae538a16e95071304b18c77 100644
--- a/thirdparty/lzo/README_zh.md
+++ b/thirdparty/lzo/README_zh.md
@@ -1,8 +1,12 @@
# lzo三方库说明
## 功能简介
LZO是一个用ANSI C编写的便携式无损数据压缩库,提供相当快的压缩和极快的解压缩,它特别适用于需要快速压缩和解压缩的场合,如嵌入式系统、实时通信和流媒体处理等。
+
+## 三方库版本
+- 2.10
+
## 使用约束
-- SDK版本:sdk-linux-5.0.3.100
-- 三方库版本:lzo-2.10
+- [IDE和SDK版本](../../docs/constraint.md)
+
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/lzo/docs/hap_integrate.md b/thirdparty/lzo/docs/hap_integrate.md
index 2f2ca045d4b4c99ecc94580f3036cb156e940106..cdf55a89767ad09481a71505be178c92bd0db133 100644
--- a/thirdparty/lzo/docs/hap_integrate.md
+++ b/thirdparty/lzo/docs/hap_integrate.md
@@ -1,12 +1,7 @@
# lzo集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
- 下载本仓库
```shell
diff --git a/thirdparty/marisa-trie/README_zh.md b/thirdparty/marisa-trie/README_zh.md
index 8234d445b7e55cc8aaeb2b458e05b04b9f32ce5f..0523f5fea47a0fcb76eed14a6c6ed82e39194b89 100755
--- a/thirdparty/marisa-trie/README_zh.md
+++ b/thirdparty/marisa-trie/README_zh.md
@@ -4,12 +4,14 @@
marisa 递归存储匹配算法种静态的、节省空间的trie数据结构.
-## 使用约束
+## 三方库版本
+- 4.0.0
+
+## 已适配功能
+- 提供字典树数据结构算法,用于生成并加载asr字典树.
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:4.0.0
-- 当前适配的功能:提供字典树数据结构算法,用于生成并加载asr字典树.
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
diff --git a/thirdparty/marisa-trie/docs/hap_integrate.md b/thirdparty/marisa-trie/docs/hap_integrate.md
index 6f8c30e8c12e0cd80556b01261e8b3e705cb7490..f032a553f1e7affd352754c75c0e6d6b0046eb6b 100755
--- a/thirdparty/marisa-trie/docs/hap_integrate.md
+++ b/thirdparty/marisa-trie/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/HPKBUILD b/thirdparty/mbedtls-polarssl-1.1.3/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..e7aa3be26fa955ca56d5a9e8ada2c1b50323b361
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/HPKBUILD
@@ -0,0 +1,63 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying
+# Maintainer: wangyihao<2942375747@qq.com>, wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+pkgname=mbedtls-polarssl-1.1.3
+pkgver=polarssl-1.1.3
+pkgrel=0
+pkgdesc="An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API."
+url="https://github.com/ARMmbed/mbedtls/tree/polarssl-1.1.3"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("Apache-2.0 or GPL-2.0")
+depends=()
+makedepends=()
+source="https://github.com/ARMmbed/mbedtls/archive/refs/tags/polarssl-1.1.3.zip"
+
+downloadpackage=true
+autounpack=true
+buildtools="cmake"
+
+builddir=mbedtls-polarssl-1.1.3
+packagename=mbedtls-polarssl-1.1.3.zip
+
+prepare() {
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DCMAKE_C_FLAGS="-Wno-unused-command-line-argument" \
+ -DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ cd $OLDPWD
+}
+
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir
+}
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/HPKCHECK b/thirdparty/mbedtls-polarssl-1.1.3/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..1ef2c9c92c12f723ca448ccccdd3dbfba4bf457a
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/HPKCHECK
@@ -0,0 +1,34 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangyihao<2942375747@qq.com> , wangying
+# Maintainer: wangyihao<2942375747@qq.com>, wangjialun <2271411@stu.neu.edu.cn>, zhangqian<2371418@stu.neu.edu.cn>, wangying
+
+source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+# 测试前的准备, 如果不需要可以不写。
+checkprepare(){
+ return 0
+}
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ res=0
+ cd ${builddir}/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ res=$?
+ cd $OLDPWD
+
+ return $res
+}
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/OAT.xml b/thirdparty/mbedtls-polarssl-1.1.3/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/README.OpenSource b/thirdparty/mbedtls-polarssl-1.1.3/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..5578fbcb096c93b67e2853e73f955caa855cf228
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/README.OpenSource
@@ -0,0 +1,11 @@
+[
+ {
+ "Name": "mbedtls-polarssl-1.1.3",
+ "License": "Apache-2.0 or GPL-2.0",
+ "License File": "https://github.com/Mbed-TLS/mbedtls/blob/development/LICENSE",
+ "Version Number": "polarssl-1.1.3",
+ "Owner": "2942375747@qq.com",
+ "Upstream URL": "https://github.com/Mbed-TLS/mbedtls",
+ "Description": "An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API."
+ }
+]
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/README_zh.md b/thirdparty/mbedtls-polarssl-1.1.3/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..0bc3ad2fa9f55a6469ef97f67ebc8d72c287ea42
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/README_zh.md
@@ -0,0 +1,12 @@
+# mbedtls-polarssl 三方库说明
+## 功能简介
+它是一个开源的、可移植的、易于使用的、可读的和灵活的TLS库,以及PSA加密API的参考实现。
+
+## 三方库版本
+- 1.1.3
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/SHA512SUM b/thirdparty/mbedtls-polarssl-1.1.3/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..0b29af612be3dbf628535cbe198da6120c7c549d
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/SHA512SUM
@@ -0,0 +1 @@
+c0f0089ea2b6e07aa35ae0d26091361707fbac996bd44f14030e98962d889615c9a2965074cae5ee0c0eefe1397fae094d62a392780ea9aea8cddadd3c6b547c mbedtls-polarssl-1.1.3.zip
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/docs/hap_integrate.md b/thirdparty/mbedtls-polarssl-1.1.3/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..e4474b05d5ba20d81c436edc9bbea2cbac6d3a47
--- /dev/null
+++ b/thirdparty/mbedtls-polarssl-1.1.3/docs/hap_integrate.md
@@ -0,0 +1,79 @@
+# mbedtls-polarssl-1.1.3 集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+- 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+- 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/mbedtls-polarssl-1.1.3 #三方库mbedtls-polarssl-1.1.3的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+- 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh mbedtls-polarssl-1.1.3
+ ```
+
+- 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ mbedtls-polarssl-1.1.3/arm64-v8a mbedtls-polarssl-1.1.3/armeabi-v7a
+ ```
+
+- [测试三方库](#测试三方库)
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下,将编译生成的三方库以及依赖库全部拷贝到工程的libs目录下,如下图所示:
+
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```shell
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mbedtls-polarssl-1.1.3/${OHOS_ARCH}/lib/libpolarssl.a)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mbedtls-polarssl-1.1.3/${OHOS_ARCH}/include)
+ ```
+
+## 测试三方库
+在lycium目录下执行脚本./test.sh,自动运行thridparty目录下已编译的三方库,
+
+
+```shell
+ cd lycium
+ ./test.sh mbedtls-polarssl-1.1.3
+```
+ 
+
+## 参考资料
+
+- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)
+- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
\ No newline at end of file
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_install_dir.png b/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..bb21b3447cb1baecbdcd9c3cdbe9427ce24aaca8
Binary files /dev/null and b/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_install_dir.png differ
diff --git a/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_test.png b/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_test.png
new file mode 100644
index 0000000000000000000000000000000000000000..a4abeaec4b0dcb9e78b71544aa8ffcdafd251b5e
Binary files /dev/null and b/thirdparty/mbedtls-polarssl-1.1.3/docs/pic/mbedtls-polarssl-1.1.3_test.png differ
diff --git a/thirdparty/md5-c/README_zh.md b/thirdparty/md5-c/README_zh.md
index ac06b3e48222bda13dac043a5cb952fa8814c17d..1e50d5687639f181e550e95dd890a9bf90e730a9 100644
--- a/thirdparty/md5-c/README_zh.md
+++ b/thirdparty/md5-c/README_zh.md
@@ -1,11 +1,12 @@
# md5-c三方库说明
## 功能简介
- md5的全称是md5信息摘要算法,用于确保信息传输的完整一致。
+md5的全称是md5信息摘要算法,用于确保信息传输的完整一致。
+
+## 三方库版本
+- f3529b666b7ae8b80b0a9fa88ac2a91b389909c7
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:main
-- 当前适配的功能:提供数据的序列化框架
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_ingtegrate.md)
\ No newline at end of file
diff --git a/thirdparty/md5-c/docs/hap_ingtegrate.md b/thirdparty/md5-c/docs/hap_ingtegrate.md
index 7f5f7b51a30ddd1509dc4d8b84686d2ce50e2e69..01d898461e8af167734c726fb7b07e33ce312c7f 100644
--- a/thirdparty/md5-c/docs/hap_ingtegrate.md
+++ b/thirdparty/md5-c/docs/hap_ingtegrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/minidlna/HPKBUILD b/thirdparty/minidlna/HPKBUILD
index 58f1ad0eca708f8d792cfde26cb762525f1e459c..ec5eb42eae99aaf0f9c47524a09aa65bb1e35aea 100644
--- a/thirdparty/minidlna/HPKBUILD
+++ b/thirdparty/minidlna/HPKBUILD
@@ -7,7 +7,7 @@ pkgrel=0
pkgdesc="MiniDLNA is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients."
url="https://sourceforge.net/projects/minidlna"
archs=("armeabi-v7a" "arm64-v8a")
-license=("GPLv2")
+license=("GPL-2.0")
depends=("FFmpeg" "jpeg" "sqlite" "libexif" "libid3tag" "libogg" "libvorbis" "flac")
makedepends=()
diff --git a/thirdparty/minidlna/README.OpenSource b/thirdparty/minidlna/README.OpenSource
index 7f20d0022ab0f8225ef0c74de572e081c08436ec..9c82eaaa42e1997903c7980a1d15cfe9d2884194 100644
--- a/thirdparty/minidlna/README.OpenSource
+++ b/thirdparty/minidlna/README.OpenSource
@@ -1,11 +1,85 @@
[
{
"Name": "minidlna",
- "License": "GPLv2",
- "License File": "COPYING",
+ "License": "GPL-2.0",
+ "License File": "https://sourceforge.net/p/minidlna/git/ci/master/tree/COPYING",
"Version Number": "1.3.3",
- "Owner": "huangminzhong2@huawei.com",
+ "Owner": "xiafeng@huawei.com",
"Upstream URL": "https://sourceforge.net/projects/minidlna/files/minidlna/1.3.3/minidlna-1.3.3.tar.gz",
"Description": "MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully compliant with DLNA/UPnP-AV clients."
+ },
+ {
+ "Name": "FFmpge",
+ "License": "GPL-2.0 and GPL-3.0 and LGPL-3.0 ",
+ "License File": ["https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.GPLv2","https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.GPLv3",
+ "https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv2.1","https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3"],
+ "Version Number": "n6.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n6.0.tar.gz",
+ "Description": "FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata."
+ },
+ {
+ "Name": "jpeg",
+ "License": "Independent JPEG Group License",
+ "License File": "https://www.ijg.org/files/README",
+ "Version Number": "v9e",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "http://www.ijg.org/files/jpegsrc.v9e.tar.gz",
+ "Description": "IJG is an informal group that writes and distributes a widely used free library for JPEG image compression"
+ },
+ {
+ "Name": "sqlite",
+ "License": "Public Domain",
+ "License File": "https://www.sqlite.org/copyright.html",
+ "Version Number": "version-3.42.0",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/sqlite/sqlite/archive/refs/tags/.tar.gz",
+ "Description": "This repository contains the complete source code for the SQLite database engine. Some test scripts are also included. However, many other test scripts and most of the documentation are managed separately."
+ },
+ {
+ "Name": "libexif",
+ "License": "LGPL-2.1",
+ "License File": "https://github.com/libexif/libexif/blob/master/COPYING",
+ "Version Number": "0.6.24",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/libexif/libexif/releases/download/v0.6.24/libexif-0.6.24.tar.bz2",
+ "Description": "libexif is a library for parsing, editing, and saving EXIF data."
+ },
+ {
+ "Name": "libid3tag",
+ "License": "GPL-2.0-only",
+ "License File": "https://github.com/audacity/libid3tag/blob/master/COPYING",
+ "Version Number": "0.15.1b",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://launchpadlibrarian.net/414577184/libid3tag_0.15.1b.orig.tar.gz",
+ "Description": "libid3tag is a library for reading and writing ID3 tags."
+ },
+ {
+ "Name": "libogg",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/xiph/ogg/blob/master/COPYING",
+ "Version Number": "v1.3.5",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz",
+ "Description": "Reference implementation of the Ogg media container"
+ },
+ {
+ "Name": "libvorbis",
+ "License": "BSD-3-Clause",
+ "License File": "https://github.com/xiph/vorbis/blob/master/COPYING",
+ "Version Number": "v1.3.7",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz",
+ "Description": "Reference implementation of the Ogg Vorbis audio format."
+ },
+ {
+ "Name": "flac",
+ "License": "BSD-3-Clause and GFDL-1.3-only and GPL-2.0-only and LGPL-2.1-only",
+ "License File": ["https://github.com/xiph/flac/blob/master/COPYING.Xiph","https://github.com/xiph/flac/blob/master/COPYING.LGPL",
+ "https://github.com/xiph/flac/blob/master/COPYING.GPL","https://github.com/xiph/flac/blob/master/COPYING.FDL"],
+ "Version Number": "1.4.3",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/xiph/flac/releases/download/1.4.3/flac-1.4.3.tar.xz",
+ "Description": "Free Lossless Audio Codec"
}
]
diff --git a/thirdparty/minidlna/README_zh.md b/thirdparty/minidlna/README_zh.md
index 54578a65fbc68541346b4a438407d34982b97334..a3f6976de61efeb928769167f2bfc1fb5a259e13 100644
--- a/thirdparty/minidlna/README_zh.md
+++ b/thirdparty/minidlna/README_zh.md
@@ -1,11 +1,12 @@
# minidlna三方库说明
## 功能简介
minidlna(又名ReadyDLNA)是服务器软件,旨在完全兼容DLNA / UPnP-AV客户端。
+
+## 三方库版本
+- 1.3.3
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:1.3.3
-- 当前适配的功能:向网络上的客户端提供媒体文件(音乐、图片、视频)。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/minidlna/docs/hap_integrate.md b/thirdparty/minidlna/docs/hap_integrate.md
index d2b708b5e5c519da4efeda71d3dcea92321641bc..96acef2a9dad54a59e6e31a913795ed68b60c0af 100644
--- a/thirdparty/minidlna/docs/hap_integrate.md
+++ b/thirdparty/minidlna/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](https://gitee.com/link?target=http%3A%2F%2Fdownload.ci.openharmony.cn%2Fversion%2FMaster_Version%2FOpenHarmony_4.0.8.1%2F20230608_091058%2Fversion-Master_Version-OpenHarmony_4.0.8.1-20230608_091058-ohos-sdk-public.tar.gz)
-- [DevEco Studio 3.1 Release](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2F81%2Fv3%2FtgRUB84wR72nTfE8Ir_xMw%2Fdevecostudio-windows-3.1.0.501.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230621T074329Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/miniini/README_zh.md b/thirdparty/miniini/README_zh.md
index 5a9eb41bdf7e57e1dbb8a61750d8a429d90682cd..7d33817e1368fc142fe89252c99da782ec48a205 100644
--- a/thirdparty/miniini/README_zh.md
+++ b/thirdparty/miniini/README_zh.md
@@ -1,11 +1,12 @@
# miniini三方库说明
## 功能简介
miniini是一个用于解析INI文件的库。
+
+## 三方库版本
+- 0.9
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:0.9
-- 当前适配的功能:解析INI文件
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/miniini/docs/hap_integrate.md b/thirdparty/miniini/docs/hap_integrate.md
index 356889a44a342a94b4de6473ad220fa23b35a2d8..6129bedce2c9a0e2f3a417a9d64e24f10058af73 100644
--- a/thirdparty/miniini/docs/hap_integrate.md
+++ b/thirdparty/miniini/docs/hap_integrate.md
@@ -1,12 +1,9 @@
# miniini集成到应用hap
本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
## 编译三方库
- 下载本仓库
```
diff --git a/thirdparty/minizip-ng-1.2/HPKBUILD b/thirdparty/minizip-ng-1.2/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..0c74ba426fc864dff6a8bf132ed651864e03f010
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/HPKBUILD
@@ -0,0 +1,64 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+pkgname=minizip-ng-1.2
+#源库依赖的是minizip-ng的1.2的分支,但是这个分支没有tag包,所以用的提交号版本
+pkgvel=8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47
+pkgdesc="minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux."
+url="https://github.com/zlib-ng/minizip-ng/tree/1.2"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("zlib")
+depends=("zlib")
+makedepends=()
+
+source="https://github.com/zlib-ng/minizip-ng/archive/${pkgvel}.zip"
+builddir=${pkgname:0:10}-${pkgvel}
+packagename=${pkgvel}.zip
+autounpack=true
+downloadpackage=true
+buildtools="cmake"
+
+prepare() {
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DBUILD_TEST=ON \
+ -DCMAKE_CXX_FLAGS="${CMAKE_C_FLAGS} -L${LYCIUM_ROOT}/usr/zlib/${ARCH}/lib -lz" \
+ -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -L${LYCIUM_ROOT}/usr/zlib/${ARCH}/lib -lz" \
+ -B$ARCH-build -S./ > $buildlog 2>&1
+ $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/${builddir}
+}
diff --git a/thirdparty/minizip-ng-1.2/HPKCHECK b/thirdparty/minizip-ng-1.2/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..fb978321d292261fa8c14019bc373925fe1bdbd5
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/HPKCHECK
@@ -0,0 +1,40 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han ,li-santian <2372581223@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ res=0
+ cd ${builddir}/${ARCH}-build
+ cp -rf ../README.md readme.txt
+ ./minizip_exec readme.zip readme.txt > ${logfile} 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -1
+ fi
+ ./miniunz_exec -l readme.zip >> ${logfile} 2>&1
+ if [ $? -ne 0 ]
+ then
+ cd $OLDPWD
+ return -1
+ fi
+ res=$?
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/minizip-ng-1.2/OAT.xml b/thirdparty/minizip-ng-1.2/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/minizip-ng-1.2/README.OpenSource b/thirdparty/minizip-ng-1.2/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..3b2b0c78c0feb5274cc8973fa12cabc22b185a75
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/README.OpenSource
@@ -0,0 +1,20 @@
+[
+ {
+ "Name": "minizip-ng",
+ "License": "zlib",
+ "License File": "https://github.com/zlib-ng/minizip-ng/blob/develop/LICENSE",
+ "Version Number": "8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47",
+ "Owner": "huangminzhong2@huawei.com",
+ "Upstream URL": "https://github.com/zlib-ng/minizip-ng/tree/1.2",
+ "Description": "minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux."
+ },
+ {
+ "Name": "zlib",
+ "License": "zlib License",
+ "License File": "https://github.com/madler/zlib/blob/master/LICENSE",
+ "Version Number": "v1.2.13",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz",
+ "Description": "A massively spiffy yet delicately unobtrusive compression library."
+ }
+]
diff --git a/thirdparty/minizip-ng-1.2/README_zh.md b/thirdparty/minizip-ng-1.2/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..c3e2cc922c1b692aeda3f4c3f4c0810ce6b41b71
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/README_zh.md
@@ -0,0 +1,15 @@
+# minizip-ng三方库说明
+
+## 功能简介
+
+minizip-ng是一个用C编写的zip操作库,支持Windows、macOS和Linux。。
+
+## 三方库版本
+- 1.2(8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47)
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
+
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/minizip-ng-1.2/SHA52SUM b/thirdparty/minizip-ng-1.2/SHA52SUM
new file mode 100644
index 0000000000000000000000000000000000000000..0e0220015a48b14566c20435b0ffc739e51d57ad
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/SHA52SUM
@@ -0,0 +1 @@
+830974933cbf20a736fc35b5a84b9ee6626886cc3af01de2f5edbdde52cd2aa35c2735917a72236f1aae4c3653804c37287b4fb3ea7e511f27408bc2b2d31e6a 8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47.zip
diff --git a/thirdparty/minizip-ng-1.2/docs/hap_integrate.md b/thirdparty/minizip-ng-1.2/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..3d02947267c4e4b702ecbfa69f61234d43e8b680
--- /dev/null
+++ b/thirdparty/minizip-ng-1.2/docs/hap_integrate.md
@@ -0,0 +1,84 @@
+# minizip-ng-1.2集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/minizip-ng-1.2 #三方库minizip-ng-1.2的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh minizip-ng-1.2
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ minizip-ng-1.2/arm64-v8a minizip-ng-1.2/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下;
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库加入工程中
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/minizip-ng-1.2/${OHOS_ARCH}/lib/libaes.a)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/minizip-ng-1.2/${OHOS_ARCH}/lib/libminizip.a)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/${OHOS_ARCH}/lib/libz.a)
+ #将三方库的头文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/minizip-ng-1.2/${OHOS_ARCH}/include/)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+
+ ```
+ cd /data/tpc_c_cplusplus/thirdparty/minizip-ng-1.2/minizip-ng-8658af7e0a73d6ac4d94e81dde0e9fa95b1aff47/armeabi-v7a-build
+ cp ../README.md readme.txt
+ ./minizip_exec readme.zip readme.txt
+ ```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [minizip-ng-1.2三方库地址](https://github.com/zlib-ng/minizip-ng/tree/1.2)
diff --git a/thirdparty/minizip-ng-1.2/docs/pic/minizip-ng-1.2-dev.png b/thirdparty/minizip-ng-1.2/docs/pic/minizip-ng-1.2-dev.png
new file mode 100644
index 0000000000000000000000000000000000000000..a0ad268479fc3ad3217a2ece6b9570394d667f70
Binary files /dev/null and b/thirdparty/minizip-ng-1.2/docs/pic/minizip-ng-1.2-dev.png differ
diff --git a/thirdparty/minizip-ng-1.2/docs/pic/test-cmd-ret.png b/thirdparty/minizip-ng-1.2/docs/pic/test-cmd-ret.png
new file mode 100644
index 0000000000000000000000000000000000000000..3ed96b1beeca3919fbf87c02b1f5923faca0813d
Binary files /dev/null and b/thirdparty/minizip-ng-1.2/docs/pic/test-cmd-ret.png differ
diff --git a/thirdparty/minizip-ng/HPKBUILD b/thirdparty/minizip-ng/HPKBUILD
index e69266c9bbac792443c3bde314dc95c4a4475d2f..8e2b94d40dc48f29325e9669acc17a72f7c90c4e 100644
--- a/thirdparty/minizip-ng/HPKBUILD
+++ b/thirdparty/minizip-ng/HPKBUILD
@@ -17,8 +17,17 @@ buildtools="cmake"
builddir=$pkgname-$pkgver
packagename=$builddir.tar.gz
+patchflag=true
prepare() {
mkdir -p $builddir/$ARCH-build
+ if $patchflag
+ then
+ cd $builddir
+ # patch只需要打一次,关闭打patch
+ patch -p1 < $PKGBUILD_ROOT/minizip_oh_pkg.patch
+ cd $OLDPWD
+ patchflag=false
+ fi
}
build() {
diff --git a/thirdparty/minizip-ng/README_zh.md b/thirdparty/minizip-ng/README_zh.md
index e7609a278835fe56e127e79a60e43a2b34da6ffc..5eb078509438759e74397256c750e140a555b709 100644
--- a/thirdparty/minizip-ng/README_zh.md
+++ b/thirdparty/minizip-ng/README_zh.md
@@ -4,26 +4,25 @@
minizip是一个用C编写的zip文件操作库。
-## 使用约束
+## 三方库版本
+- 3.0.4
+
+## 已适配功能
+- 创建和解压缩zip存档。
+- 在zip存档中添加和删除条目。
+- 从内存中读取和写入压缩文件。
+- Zlib、BZIP2、LZMA、XZ和ZSTD压缩方法。
+- 跟踪并存储符号链接。
+- 通过UTF-8编码支持Unicode文件名。
+- 传统字符编码支持CP437、CP932、CP936、CP950。
+- 关闭压缩、解压缩或加密的编译
+- 将本地文件头信息归零。
+- 压缩/解压缩中心目录以减小大小
+- 如果中心目录损坏或丢失,则恢复该目录
-- ROM版本:OpenHarmony3.2 Beta1
-- IDE版本:DevEco Studio 3.1 Release
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:3.0.4
-- 当前适配的功能:
- - 创建和解压缩zip存档。
- - 在zip存档中添加和删除条目。
- - 从内存中读取和写入压缩文件。
- - Zlib、BZIP2、LZMA、XZ和ZSTD压缩方法。
- - 跟踪并存储符号链接。
- - 通过UTF-8编码支持Unicode文件名。
- - 传统字符编码支持CP437、CP932、CP936、CP950。
- - 关闭压缩、解压缩或加密的编译
- - 将本地文件头信息归零。
- - 压缩/解压缩中心目录以减小大小
- - 如果中心目录损坏或丢失,则恢复该目录
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
-- [系统Rom包集成](docs/rom_integrate.md)
- [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/minizip-ng/docs/hap_integrate.md b/thirdparty/minizip-ng/docs/hap_integrate.md
index 40dbb0cdca677f74fb9e97fe245f162282425af5..aae9db39efefeac13883277e241d78162e269e18 100755
--- a/thirdparty/minizip-ng/docs/hap_integrate.md
+++ b/thirdparty/minizip-ng/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2.1Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 3.2.12.5](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2.1%2Fohos-sdk-windows_linux-public.tar.gz)
-- [DevEco Studio 3.1 Beta2](https://gitee.com/link?target=https%3A%2F%2Fcontentcenter-vali-drcn.dbankcdn.cn%2Fpvt_2%2FDeveloperAlliance_package_901_9%2Ff3%2Fv3%2FuJyuq3syQ2ak4hE1QZmAug%2Fdevecostudio-windows-3.1.0.400.zip%3FHW-CC-KV%3DV1%26HW-CC-Date%3D20230408T013335Z%26HW-CC-Expire%3D315360000%26HW-CC-Sign%3D96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/minizip-ng/minizip_oh_pkg.patch b/thirdparty/minizip-ng/minizip_oh_pkg.patch
new file mode 100644
index 0000000000000000000000000000000000000000..617c3096f2db32a2ef1fae4f55cb584dc4910d2f
--- /dev/null
+++ b/thirdparty/minizip-ng/minizip_oh_pkg.patch
@@ -0,0 +1,22 @@
+---
+ mz_os_posix.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mz_os_posix.c b/mz_os_posix.c
+index aefc1a4..9d95f8b 100644
+--- a/mz_os_posix.c
++++ b/mz_os_posix.c
+@@ -57,7 +57,11 @@ uint8_t *mz_os_utf8_string_create(const char *string, int32_t encoding) {
+ else if (encoding == MZ_ENCODING_CODEPAGE_932)
+ from_encoding = "CP932";
+ else if (encoding == MZ_ENCODING_CODEPAGE_936)
++#ifdef __OHOS__
++ from_encoding = "GB18030";
++#else
+ from_encoding = "CP936";
++#endif
+ else if (encoding == MZ_ENCODING_CODEPAGE_950)
+ from_encoding = "CP950";
+ else if (encoding == MZ_ENCODING_UTF8)
+--
+2.34.1
diff --git a/thirdparty/mpfr/HPKBUILD b/thirdparty/mpfr/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..0fdbc693480ed6717657c8b2b8fde1df3b5af611
--- /dev/null
+++ b/thirdparty/mpfr/HPKBUILD
@@ -0,0 +1,88 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , Sunjiamei<939650669@qq.com>
+# Maintainer: Jeff Han
+
+pkgname=mpfr
+pkgver=4.2.1
+pkgrel=0
+pkgdesc="The mpfr library is a C library for multiple-precision floating-point computations with correct rounding."
+url="https://www.mpfr.org"
+archs=("armeabi-v7a" "arm64-v8a")
+license=("GPL-3.0")
+depends=("gmp")
+makedepends=()
+
+source="https://www.$pkgname.org/$pkgname-current/$pkgname-$pkgver.zip"
+
+autounpack=true
+downloadpackage=true
+buildtools="configure"
+
+builddir=$pkgname-${pkgver}
+packagename=$builddir.zip
+
+source envset.sh
+host=
+prepare() {
+ cp -rf $builddir $builddir-$ARCH-build
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ setarm32ENV
+ host=arm-linux
+ elif [ $ARCH == "arm64-v8a" ]
+ then
+ setarm64ENV
+ host=aarch64-linux
+ else
+ echo "$ARCH not support!"
+ return -1
+ fi
+ export CFLAGS="-I$LYCIUM_ROOT/usr/gmp/$ARCH/include -L$LYCIUM_ROOT/usr/gmp/$ARCH/lib"
+}
+
+build() {
+ cd $builddir-$ARCH-build
+ ./configure "$@" --host=$host > $buildlog 2>&1
+ $MAKE VERBOSE=1 >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir-$ARCH-build
+ $MAKE install VERBOSE=1 >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ echo "The test must be on an OpenHarmony device!"
+ cd $builddir-$ARCH-build
+ # 注释掉测试部分
+ sed -i.bak 's|$(MAKE) $(AM_MAKEFLAGS) check-TESTS|# $(MAKE) $(AM_MAKEFLAGS) check-TESTS|g' tests/Makefile
+ $MAKE check >> $buildlog 2>&1
+ # 注释掉编译部分
+ sed -i.bak '/^all: all-am$/,/^\t@:$/s/^/#/' tests/Makefile
+ sed -i.bak 's|# $(MAKE) $(AM_MAKEFLAGS) check-TESTS|$(MAKE) $(AM_MAKEFLAGS) check-TESTS|g' tests/Makefile
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+cleanbuild() {
+ rm -rf ${PWD}/$builddir $builddir-armeabi-v7a-build $builddir-arm64-v8a-build
+}
diff --git a/thirdparty/mpfr/HPKCHECK b/thirdparty/mpfr/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..2f6d4472c93bb04baeac36c08ce5be777944f26c
--- /dev/null
+++ b/thirdparty/mpfr/HPKCHECK
@@ -0,0 +1,40 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , Sunjiamei<939650669@qq.com>
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+checkprepare() {
+ if [ ! -f /usr/bin/sed ]
+ then
+ ln -s /bin/sed /usr/bin/sed
+ fi
+}
+
+openharmonycheck() {
+ res=0
+ cd $builddir-$ARCH-build/tests
+ make check-TESTS > ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ]; then
+ echo "test failed" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+ fi
+ echo "test pass" >> ${logfile} 2>&1
+ cd $OLDPWD
+ return $res
+}
diff --git a/thirdparty/mpfr/OAT.xml b/thirdparty/mpfr/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9
--- /dev/null
+++ b/thirdparty/mpfr/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/thirdparty/mpfr/README.OpenSource b/thirdparty/mpfr/README.OpenSource
new file mode 100644
index 0000000000000000000000000000000000000000..060a8b15d9726911793551f65f97f6800e8337a0
--- /dev/null
+++ b/thirdparty/mpfr/README.OpenSource
@@ -0,0 +1,20 @@
+[
+ {
+ "Name": "mpfr",
+ "License": "GPL-3.0",
+ "License File": "https://www.gnu.org/licenses/lgpl-3.0.html",
+ "Version Number": "4.2.1",
+ "Owner": "hanjinfei@foxmail.com",
+ "Upstream URL": "https://www.mpfr.org",
+ "Description": "The mpfr library is a C library for multiple-precision floating-point computations with correct rounding."
+ },
+ {
+ "Name": "gmp",
+ "License": "gplv2 and gplv3"",
+ "License File": ["https://www.gnu.org/licenses/old-licenses/gpl-2.0.html","https://www.gnu.org/licenses/lgpl-3.0.html"],
+ "Version Number": "v1.0.12",
+ "Owner": "chenbaodi@huawei.com",
+ "Upstream URL": "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz",
+ "Description": "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers."
+ }
+]
diff --git a/thirdparty/mpfr/README_zh.md b/thirdparty/mpfr/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..c8ee4c7512f3d303b331bd4b4d6a0f277a1eb69b
--- /dev/null
+++ b/thirdparty/mpfr/README_zh.md
@@ -0,0 +1,12 @@
+# mpfr 三方库说明
+## 功能简介
+mpfr库是一个C库,用于正确舍入的多精度浮点计算。
+
+## 三方库版本
+- 4.2.1
+
+## 使用约束
+- [IDE和SDK版本](../../docs/constraint.md)
+
+## 集成方式
++ [应用hap包集成](docs/hap_integrate.md)
diff --git a/thirdparty/mpfr/SHA512SUM b/thirdparty/mpfr/SHA512SUM
new file mode 100644
index 0000000000000000000000000000000000000000..aea9bc92d58feedb525143cc4df36aa0f93f0f40
--- /dev/null
+++ b/thirdparty/mpfr/SHA512SUM
@@ -0,0 +1 @@
+3de08deefdf7a660a4830885446f3615f8b459a8f7521e30c486708cb1f7516b5ff4c7dbfa4d3683cd85c7446d6d9505c8dcf795fb1d8983b4bdd888cbdf33b6 mpfr-4.2.1.zip
diff --git a/thirdparty/mpfr/docs/hap_integrate.md b/thirdparty/mpfr/docs/hap_integrate.md
new file mode 100644
index 0000000000000000000000000000000000000000..341a9500545a5023f912b728c7c95cdc35282505
--- /dev/null
+++ b/thirdparty/mpfr/docs/hap_integrate.md
@@ -0,0 +1,84 @@
+# mpfr集成到应用hap
+
+本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。
+
+## 开发环境
+
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
+
+## 编译三方库
+
+* 下载本仓库
+
+ ```shell
+ git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1
+ ```
+
+* 三方库目录结构
+
+ ```shell
+ tpc_c_cplusplus/thirdparty/mpfr #三方库mpfr的目录结构如下
+ ├── docs #三方库相关文档的文件夹
+ ├── HPKBUILD #构建脚本
+ ├── HPKCHECK #测试脚本
+ ├── OAT.xml #扫描结果文件
+ ├── SHA512SUM #三方库校验文件
+ ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息
+ ├── README_zh.md #三方库简介
+ ```
+
+* 在lycium目录下编译三方库
+
+ 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
+
+ ```shell
+ cd lycium
+ ./build.sh mpfr
+ ```
+
+* 三方库头文件及生成的库
+
+ 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库
+
+ ```shell
+ mpfr/arm64-v8a mpfr/armeabi-v7a
+ gmp/arm64-v8a gmp/armeabi-v7a
+ ```
+
+* [测试三方库](#测试三方库)
+
+## 应用中使用三方库
+
+- 在IDE的cpp目录下新增thirdparty目录,将三方库及其依赖库编译生成的头文件拷贝到该目录下。如下图所示:
+
+ 
+
+- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句
+
+ ```cmake
+ #将三方库的头文件和库文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mpfr/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/mpfr/${OHOS_ARCH}/lib/mpfr.a)
+ #将三方库依赖库的头文件和库文件加入工程中
+ target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gmp/${OHOS_ARCH}/include)
+ target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gmp/${OHOS_ARCH}/lib/gmp.a)
+ ```
+
+## 测试三方库
+
+- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+
+- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示
+```
+ cd /data/tpc_c_cplusplus/thirdparty/mpfr/mpfr-4.2.1-armeabi-v7a-build
+ make check-TESTS
+```
+
+ 
+
+## 参考资料
+
+* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc)
+* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge)
+* [mpfr三方库地址](https://www.mpfr.org)
+
diff --git a/thirdparty/mpfr/docs/pic/mpfr-test.png b/thirdparty/mpfr/docs/pic/mpfr-test.png
new file mode 100644
index 0000000000000000000000000000000000000000..0cc6a37dc5979652f5dd0df9e95238ce5f057138
Binary files /dev/null and b/thirdparty/mpfr/docs/pic/mpfr-test.png differ
diff --git a/thirdparty/mpfr/docs/pic/mpfr_install_dir.png b/thirdparty/mpfr/docs/pic/mpfr_install_dir.png
new file mode 100644
index 0000000000000000000000000000000000000000..90128e13b8b8ee41f73f178876a9d776fad570ce
Binary files /dev/null and b/thirdparty/mpfr/docs/pic/mpfr_install_dir.png differ
diff --git a/thirdparty/mqtt/HPKBUILD b/thirdparty/mqtt/HPKBUILD
index 64644091d2d472aaefa4fe73a395a82b00183911..5569883c53142ef00c8ebbfdcc0cd3b2a7d167f5 100644
--- a/thirdparty/mqtt/HPKBUILD
+++ b/thirdparty/mqtt/HPKBUILD
@@ -20,7 +20,7 @@ pkgrel=0
pkgdesc="Eclipse Paho C Client Library for the MQTT Protocol"
url="https://github.com/eclipse/paho.mqtt.c"
archs=("armeabi-v7a" "arm64-v8a")
-license=("Eclipse Public License 2.0 & Eclipse Distribution License 1.0")
+license=("EPL-2.0 & EDL-1.0")
depends=("openssl")
makedepends=()
diff --git a/thirdparty/mqtt/README.OpenSource b/thirdparty/mqtt/README.OpenSource
index 8e2f1186c89ba3dddfa0211316f05ec50a8787a1..442c84b5a49c300a78488ed283275d3032a6504c 100755
--- a/thirdparty/mqtt/README.OpenSource
+++ b/thirdparty/mqtt/README.OpenSource
@@ -1,11 +1,20 @@
[
{
- "Name": "paho.mqtt.c",
- "License": "Eclipse Public License - v 2.0",
- "License File": "LICENSE",
- "Owner": "wangqing@kaihong.com",
- "Version Number": "paho.mqtt.c-v1.3.12",
+ "Name": "mqtt",
+ "License": "EPL-2.0 and EDL-1.0",
+ "License File": "https://github.com/eclipse/paho.mqtt.c/blob/master/LICENSE",
+ "Owner": "xiafeng@huawei.com",
+ "Version Number": "v1.3.12",
"Upstream URL": "https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/v1.3.12.zip",
"Description": "This repository contains the source code for the Eclipse Paho MQTT C client library."
+ },
+ {
+ "Name": "openssl",
+ "License": "OpenSSL License and Original SSLeay License",
+ "License File": "https://www.openssl.org/source/license-openssl-ssleay.txt",
+ "Version Number": "1.1.1u",
+ "Owner": "xiafeng@huawei.com",
+ "Upstream URL": "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1u.tar.gz",
+ "Description": "OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol."
}
]
diff --git a/thirdparty/mqtt/README_zh.md b/thirdparty/mqtt/README_zh.md
index d02b4e3694f7734be2471d549fdfaa66dbf5ecb9..8a389f420f4548f0c0035e6201df588f8532c6fd 100755
--- a/thirdparty/mqtt/README_zh.md
+++ b/thirdparty/mqtt/README_zh.md
@@ -1,13 +1,15 @@
# MQTT三方库说明
## 功能简介
MQTT 是用 C 语言编写的用于MQTT协议的Eclipse Paho C客户端库。
+
+## 三方库版本
+- paho.mqtt.c-v1.3.12
+
+## 已适配功能
+- 使用该库使应用程序能够连接到MQTT代理以发布消息,并订阅主题和接收已发布的消息。
+
## 使用约束
-- IDE版本:DevEco Studio 3.1 Release
-- ROM版本:OpenHarmony3.2 beta4
-- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release)
-- 三方库版本:paho.mqtt.c-v1.3.12
-- 当前适配的功能:使用该库使应用程序能够连接到MQTT代理以发布消息,并订阅主题和接收已发布的消息。
+- [IDE和SDK版本](../../docs/constraint.md)
## 集成方式
+ [应用hap包集成](docs/hap_integrate.md)
-+ [系统Rom包集成](./docs/rom_integrate.md)
diff --git a/thirdparty/mqtt/docs/hap_integrate.md b/thirdparty/mqtt/docs/hap_integrate.md
index 61dedf87bb420e8c893a062f3a938597fab81605..4ec55bb9d77f718fa7b9fd495019769db9ab0ca8 100644
--- a/thirdparty/mqtt/docs/hap_integrate.md
+++ b/thirdparty/mqtt/docs/hap_integrate.md
@@ -4,12 +4,7 @@
## 开发环境
-- ubuntu20.04
-- [OpenHarmony3.2Release镜像](https://gitee.com/link?target=https%3A%2F%2Frepo.huaweicloud.com%2Fopenharmony%2Fos%2F3.2-Release%2Fdayu200_standard_arm32.tar.gz)
-- [ohos_sdk_public 4.0.8.1 (API Version 10 Release)](http://download.ci.openharmony.cn/version/Master_Version/OpenHarmony_4.0.8.1/20230608_091016/version-Master_Version-OpenHarmony_4.0.8.1-20230608_091016-ohos-sdk-full.tar.gz)
-- [DevEco Studio 3.1 Release](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/81/v3/tgRUB84wR72nTfE8Ir_xMw/devecostudio-windows-3.1.0.501.zip?HW-CC-KV=V1&HW-CC-Date=20230621T074329Z&HW-CC-Expire=315360000&HW-CC-Sign=22F6787DF6093ECB4D4E08F9379B114280E1F65DA710599E48EA38CB24F3DBF2)
-- [准备三方库构建环境](../../../lycium/README.md#1编译环境准备)
-- [准备三方库测试环境](../../../lycium/README.md#3ci环境准备)
+- [开发环境准备](../../../docs/hap_integrate_environment.md)
## 编译三方库
diff --git a/thirdparty/msgpack-c/HPKBUILD b/thirdparty/msgpack-c/HPKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..bec2840549aa74d6ebed13d90588ec9f070068e0
--- /dev/null
+++ b/thirdparty/msgpack-c/HPKBUILD
@@ -0,0 +1,85 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , DongZhengDong
+# Maintainer: Jeff Han
+
+pkgname=msgpack-c
+pkgver=cpp-6.1.1
+pkgrel=0
+pkgdesc="msgpack-c is an efficient and lightweight binary serialization format that allows you to exchange data in a high-performance manner between multiple programming languages."
+url="https://github.com/msgpack/msgpack-c"
+archs=("arm64-v8a" "armeabi-v7a")
+license=("BSL-1.0")
+depends=(boost)
+makedepends=()
+source="https://codeload.github.com/msgpack/$pkgname/zip/refs/tags/$pkgver"
+autounpack=ture
+downloadpackage=ture
+buildtools="cmake"
+
+builddir=$pkgname-$pkgver
+packagename=$builddir.zip
+source envset.sh
+
+prepare() {
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ setarm32ENV
+ fi
+ if [ $ARCH == "arm64-v8a" ]
+ then
+ setarm64ENV
+ fi
+ mkdir -p $builddir/$ARCH-build
+}
+
+build() {
+ cd $builddir
+ ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \
+ -DBoost_INCLUDE_DIR="${LYCIUM_ROOT}/usr/boost/$ARCH/include" -DBoost_LIBRARY_DIR="${LYCIUM_ROOT}/usr/boost/$ARCH/lib" \
+ -DMSGPACK_BUILD_TESTS=ON -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > $buildlog 2>&1
+ $MAKE -C $ARCH-build >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+package() {
+ cd $builddir
+ $MAKE -C $ARCH-build install >> $buildlog 2>&1
+ ret=$?
+ cd $OLDPWD
+ return $ret
+}
+
+check() {
+ cd $builddir
+ sed -i.bak "s|`pwd`|/data/tpc_c_cplusplus/thirdparty/msgpack-c/msgpack-c-cpp-6.1.1|g" $ARCH-build/DartConfiguration.tcl
+ sed -i.bak "s|`pwd`|/data/tpc_c_cplusplus/thirdparty/msgpack-c/msgpack-c-cpp-6.1.1|g" $ARCH-build/test/CTestTestfile.cmake
+ cd $OLDPWD
+ if [ $ARCH == "armeabi-v7a" ]
+ then
+ unsetarm32ENV
+ fi
+ if [ $ARCH == "arm64-v8a" ]
+ then
+ unsetarm64ENV
+ fi
+ unset host
+ echo "Test MUST on OpenHarmony device!"
+}
+
+cleanbuild(){
+ rm -rf ${PWD}/$builddir
+}
diff --git a/thirdparty/msgpack-c/HPKCHECK b/thirdparty/msgpack-c/HPKCHECK
new file mode 100644
index 0000000000000000000000000000000000000000..ae425b6ea36d14d83c656fc231c0cba668f921d1
--- /dev/null
+++ b/thirdparty/msgpack-c/HPKCHECK
@@ -0,0 +1,42 @@
+# Copyright (c) 2023 Huawei Device Co., Ltd.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Contributor: Jeff Han , DZD
+# Maintainer: Jeff Han
+
+source HPKBUILD > /dev/null 2>&1 # 导入HPKBUILD文件
+logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
+
+# 测试前的准备, 如果不需要可以不写。
+checkprepare(){
+ return 0
+}
+
+# 在OH环境执行测试的接口
+openharmonycheck() {
+ res=0
+ export LD_LIBRARY_PATH="/data/:$LYCIUM_ROOT/usr/boost/$ARCH/lib/"
+ cd $builddir/${ARCH}-build
+ ctest > ${logfile} 2>&1
+ res=$?
+ if [ $res -ne 0 ]
+ then
+ mkdir -p ${LYCIUM_FAULT_PATH}/${pkgname}
+ cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/
+ cd $OLDPWD
+ return $res
+ fi
+ cd $OLDPWD
+ return $res
+}
+
diff --git a/thirdparty/msgpack-c/OAT.xml b/thirdparty/msgpack-c/OAT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..03ee5a760a1f17e2e86907647046114696ade760
--- /dev/null
+++ b/thirdparty/msgpack-c/OAT.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+